资源简介
极限学习机(Extreme Learning Machine) ELM,是由黄广斌提出来的求解单隐层神经网络的算法。
ELM最大的特点是对于传统的神经网络,尤其是单隐层前馈神经网络(SLFNs),在保证学习精度的前提下比传统的学习算法速度更快。
代码片段和文件信息
function [TrainingTime TestingTime TrainingAccuracy TestingAccuracy] = elm(TrainingData_File TestingData_File Elm_Type NumberofHiddenNeurons ActivationFunction)
% Usage: elm(TrainingData_File TestingData_File Elm_Type NumberofHiddenNeurons ActivationFunction)
% OR: [TrainingTime TestingTime TrainingAccuracy TestingAccuracy] = elm(TrainingData_File TestingData_File Elm_Type NumberofHiddenNeurons ActivationFunction)
%
% Input:
% TrainingData_File - Filename of training data set
% TestingData_File - Filename of testing data set
% Elm_Type - 0 for regression; 1 for (both binary and multi-classes) classification
% NumberofHiddenNeurons - Number of hidden neurons assigned to the ELM
% ActivationFunction - Type of activation function:
% ‘sig‘ for Sigmoidal function
% ‘sin‘ for Sine function
% ‘hardlim‘ for Hardlim function
% ‘tribas‘ for Triangular basis function
% ‘radbas‘ for Radial basis function (for additive type of SLFNs instead of RBF type of SLFNs)
%
% Output:
% TrainingTime - Time (seconds) spent on training ELM
% TestingTime - Time (seconds) spent on predicting ALL testing data
% TrainingAccuracy - Training accuracy:
% RMSE for regression or correct classification rate for classification
% TestingAccuracy - Testing accuracy:
% RMSE for regression or correct classification rate for classification
%
% MULTI-CLASSE CLASSIFICATION: NUMBER OF OUTPUT NEURONS WILL BE AUTOMATICALLY SET EQUAL TO NUMBER OF CLASSES
% FOR EXAMPLE if there are 7 classes in all there will have 7 output
% neurons; neuron 5 has the highest output means input belongs to 5-th class
%
% Sample1 regression: [TrainingTime TestingTime TrainingAccuracy TestingAccuracy] = elm(‘sinc_train‘ ‘sinc_test‘ 0 20 ‘sig‘)
% Sample2 classification: elm(‘diabetes_train‘ ‘diabetes_test‘ 1 20 ‘sig‘)
%
%%%% Authors: MR QIN-YU ZHU AND DR GUANG-BIN HUANG
%%%% NANYANG TECHNOLOGICAL UNIVERSITY SINGAPORE
%%%% EMAIL: EGBHUANG@NTU.EDU.SG; GBHUANG@IEEE.ORG
%%%% WEBSITE: http://www.ntu.edu.sg/eee/icis/cv/egbhuang.htm
%%%% DATE: APRIL 2004
%%%%%%%%%%% Macro definition
REGRESSION=0;
CLASSIFIER=1;
%%%%%%%%%%% Load training dataset
train_data=load(TrainingData_File);
T=train_data(:1)‘;
P=train_data(:2:size(train_data2))‘;
clear train_data; % Release raw training data array
%%%%%%%%%%% Load testing dataset
test_data=load(TestingData_File);
TV.T=test_data(:1)‘;
TV.P=test_data(:2:size(test_data2))‘;
clear test_data; % Release raw testing data array
NumberofTrainingData=size(P2);
NumberofTestingData=size(TV.P2);
NumberofInputNeurons=size(P1);
if
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 9446 2018-10-01 15:27 ELM\elm.m
文件 9279 2018-10-01 15:33 ELM\ELM2.m
文件 7348 2018-10-01 15:44 ELM\elm_test.m
文件 7348 2018-10-01 16:00 ELM\elm_test_OWN.m
文件 3253 2018-10-01 15:55 ELM\sinc_test
文件 114566 2018-10-01 15:35 ELM\sinc_train
目录 0 2018-10-01 16:00 ELM
----------- --------- ---------- ----- ----
151240 7
- 上一篇:3Dmax批量导出DAE文件插件
- 下一篇:多种核函数的SVM分类器matlab程序
相关资源
- 多种核函数的SVM分类器matlab程序
- 模糊PID的MATLAB程序
- 机器人手眼标定Matlab程序高精度
- S变换-matlab程序
- 单脉冲相位和差测角MATLAB程序
- gabor+svm matlab程序,一共三个文件,两
- UKF的MATLAB程序
- hough变换检测圆的matlab程序
- 基于尺度形态学的边缘检测matlab程序
- 基于小波变换的边缘检测matlab程序
- canny边缘检测的matlab程序
- 冲击电流发生器matlab程序非线性元件
- 冲击电流发生器matlab程序
- 基于Elman神经网络的房价预测matlab脚本
- 人脸检测肤色分割MATLAB程序
- svm+smo matlab程序
- MATLAB程序——单摆摆动的动画
- 双基地MIMO雷达目标跟踪算法matlab程序
- OSTU多阈值分割MATLAB程序
- LMS音频降噪matlab程序
- 非线性各向异性扩散滤波MATLAB程序
- 基于标记的分水岭算法matlab程序
- 最优化 外点罚函数 有matlab程序
- 33节点的遗传算法无功优化MATLAB程序
- 正则化粒子滤波matlab程序
- MATLAB程序设计与应用(刘卫国-第3版)
- nurbs曲线matlab程序代码
- 率失真函数计算matlab程序-信息论
- 概率数据关联算法matlab程序
- 快速Fourier变换算法及Matlab程序实现
评论
共有 条评论