当前位置:网站首页>[elm classification] classification of UCI data sets based on nuclear limit learning machine and limit learning machine, with matlab code
[elm classification] classification of UCI data sets based on nuclear limit learning machine and limit learning machine, with matlab code
2022-07-27 23:26:00 【Matlab scientific research studio】
1 Content introduction
Extreme learning machine (extreme learning machine,ELM) As a new machine learning method , It has become a hot research direction . ELM Randomly determine the input weights and hidden layer node offsets of the single hidden layer network , The output weight can be obtained by simple calculation , It not only accelerates the learning speed , And it has good generalization ability . Kernel function ELM Introduce kernel function into limit learning machine theory , The least square optimization solution can be obtained , It's solved
ELM Algorithm random initialization problem , It has good robustness to model learning parameters , With more stable 、 Better generalization performance .



2 Simulation code
clcclear allDataSetName = 'waveform'; % With matlab The name of the dataset stored in the formatTrainSamplesPartio = 0.5; % Proportion of training samples of each typeC = 100; % Regularization factorDataSet = load(DataSetName, '-mat'); % Load file into programDataSet = getfield(DataSet, DataSetName);% Get the data in the fileKindIdx = DataSet(:,1); % Get category number , Data number one 1 List as category numberKindCount = length(unique(KindIdx)); % Total number of categoriesSortedDataSet = sortrows(DataSet, 1); % Arrange data by class label , Rearrange data from small to large according to class label , Facilitate random data extraction laterclear DataSetEachKindCount = zeros(1,KindCount); % Number of data of each typefor i=1:KindCountEachKindCount(i) = sum(sum( i == SortedDataSet(:,1))); % The first i Number of class dataendTrainData = [];TestData = [];% Put all kinds of training data and test data into a matrixTrainTemp = [];TestTemp = [];for i=1:KindCountif i==1TempIdx1(1:TrainSamCountEachKind(i),1) = i; % Mark the training data class labelTempIdx2(1:size(TestDataEachKind{i},1),1) = i; % Mark the test data class labelTrainData = [TempIdx1 TrainDataEachKind{1,i}]; % The first column is the class labelTestData = [TempIdx2 TestDataEachKind{1,i}];TempIdx1 = []; % Clear the class label here , Otherwise, wrong class labels may be generated , Because the number of each type of data may be differentTempIdx2 = [];TrainTemp = TrainData;TestTemp = TestData;elseTempIdx1(1:TrainSamCountEachKind(i),1) = i;TempIdx2(1:size(TestDataEachKind{i},1),1) = i;TrainData = [TrainTemp;[TempIdx1 TrainDataEachKind{1,i}]];TestData = [TestTemp;[TempIdx2 TestDataEachKind{1,i}]];TrainTemp = TrainData;TestTemp = TestData;TempIdx1 = [];TempIdx2 = [];endendclear TrainTemp TestTemp TrainDataEachKind TestDataEachKind% The statistical results[label_index_actual, label_index_expected, TrainingAccuracy, TestingAccuracy] = elm(TrainData, TestData, 1, KindCount, 'sig');% Format and output relevant information , It can be modified according to your own needsfprintf('Run Information:\n')fprintf('+-----------------------------------------------+\n')fprintf('|KindIdx | EachKindCount | EachTrainKindCount |\n');fprintf('+-----------------------------------------------+\n')Msgemat='| %2d |%9d |%11d |\n';for i=1:KindCountfprintf(Msgemat, i, EachKindCount(i), TrainSamCountEachKind(i));fprintf('+-----------------------------------------------+\n')endfprintf('+------------------------------------------------------+\n')figureplot(label_index_actual,'rs')hold onplot( label_index_expected,'bo')xlabel(' sample ')legend(' True value ',' Test value ')title([' Test accuracy =',num2str(TestingAccuracy)])
3 Running results


4 reference
[1] Wang Li , LAN Zhi , Yang Rong , etc. . Based on kernel limit learning machine and wavelet packet transform EEG classification method [J]. Beijing Biomedical Engineering , 2018, 37(5):8.
[2] Wang Li et al . " Based on kernel limit learning machine and wavelet packet transform EEG classification method .".
About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .
Some theories cite network literature , If there is infringement, contact the blogger to delete .
边栏推荐
- What is the b+tree index of MySQL? How does the cluster index grow?
- [C language] simulate and implement string functions (Part 1)
- 【GNN报告】加拿大蒙特利尔唐建:Geometric Deep Learning For Drug Discovery
- Simple and practical data visualization cases
- VIM editor tutorial
- Pro multi store version system, versatile is it!
- See how Gan controls the image generation style step by step? Explain the evolution process of stylegan in detail
- [noi2018] bubble sort (combination + Cartland number +dp+ tree array)
- 小程序容器技术超有料,可以让移动研发效率大幅提升
- 简单实用的数据可视化案例
猜你喜欢

Tips and extensions of graph theory

初步了解Panda3D音频和高级交互组件

【软考软件评测师】2014综合知识历年真题

4 轮拿下字节 Offer,面试题复盘

You don't know about redis. Let me explain the underlying data structure of redis in detail

【 图像去雾】基于暗通道和非均值滤波实现图像去雾附matlab代码

【信号处理】基于高阶统计量特征的通信系统中微弱信号检测附matlab代码

回Mixlab三天,“创造力团队”治好了我的精神内耗

Convnext:a convnet for the 2020s - model Brief

【GNN报告】加拿大蒙特利尔唐建:Geometric Deep Learning For Drug Discovery
随机推荐
2022/4/8 exam summary
寻找和利用 XXE – XML 外部实体注入
containerd ctr运行ansible容器执行ansible-playbook任务完整命令
China Internet Security Report 2021: API threat soared by more than 200%, and the security risk of software supply chain increased
The security dilemma of software supply chain faced by enterprises
测试文章
看GAN如何一步步控制图像生成风格?详解StyleGAN进化过程
51 MCU internal peripherals: real time clock (SPI)
图论的小技巧以及扩展
【数字识别】基于知识库实现手写体数字识别附matlab代码
Parameter transmission of components
Cloudcompare & PCL platform convex hull method to calculate crown volume
Excel VBA finds out the maximum and minimum values of a column of time, and repeatedly pastes multiple values according to the actual situation
面试官:说一下网络数据传输的具体流程
Cloud native enthusiast weekly: a complete collection of client go examples
Safety Fundamentals 1
Blender plug-in of 2022
Exam summary on May 13, 2022
Cron expression
强化学习——PyTorch 实现 Advantage Actor-Critic (A2C)