当前位置:网站首页>[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-28 02:45:00 【matlab_ dingdang】
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 .
边栏推荐
- 【TA-霜狼_may-《百人计划》】图形3.5 Early-z 和 Z-prepass
- Compile and use Qwt in qt|vs2017
- windbg
- 修改MySQL密码的四种方法(适合初学者)
- Sqlserver problem solving: replication components are not installed on this server. Please run SQL Server Setup again and select the option to install replication components
- Four methods of modifying MySQL password (suitable for beginners)
- [leetcode] 13. linked list cycle · circular linked list
- 【ELM分类】基于核极限学习机和极限学习机实现UCI数据集分类附matlab代码
- Notes for the fourth time of first knowing C language
- Use try-with-resources or close this
猜你喜欢

分层图解决的一些最短路问题

AWS elastic three swordsman

Four methods of modifying MySQL password (suitable for beginners)

【图像隐藏】基于DCT、DWT、LHA、LSB的数字图像信息隐藏系统含各类攻击和性能参数附matlab代码

Usage of delegate

关于Sqli-labs单引号不报错的问题

Today in history: the father of database passed away; Apple buys cups code; IBM chip Alliance

修改MySQL密码的四种方法(适合初学者)

Notes for the fourth time of first knowing C language
![[leetcode] 13. linked list cycle · circular linked list](/img/58/c8796bb5ed96d09325b8f2fa6a709e.png)
[leetcode] 13. linked list cycle · circular linked list
随机推荐
First knowledge of C language -- structure, branch and loop statements
AWS elastic three swordsman
Common SQL statement query
初识C语言 -- 结构体,分支和循环语句
MYSQL解决死锁之路 - 常见 SQL 语句的加锁分析
第二季度邮件安全报告:邮件攻击暴增4倍,利用知名品牌获取信任
Compile and use Qwt in qt|vs2017
Learn this trick and never be afraid to let the code collapse by mistake
别人发你的jar包你如何使用(如何使用别人发您的jar包)
LETV responded that employees live an immortal life without internal problems and bosses; Apple refuses to store user icloud data in Russia; Dapr 1.8.0 release | geek headlines
unordered_ The hash function of map and the storage mode of hash bucket
Interviewer: what is the factory method mode?
修改MySQL密码的四种方法(适合初学者)
pytorch优化器设置
New infrastructure helps the transformation and development of intelligent road transportation
Is the interface that can be seen everywhere in the program really useful? Is it really right?
Wechat campus bathroom reservation applet graduation design finished product (2) applet function
Flutter神操作学习之(满级攻略)
Canvas 从入门到劝朋友放弃(图解版)
Wechat campus bathroom reservation applet graduation design finished product (3) background function