资源简介
粒子群算法优化极限学习机的参数,实现SINC函数拟合
代码片段和文件信息
function [TrainingTime TestingTime TrainingAccuracy TestingAccuracyTY] = 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
%
% 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 classifcation
% TestingAccuracy - Testing accuracy:
% RMSE for regression or correct classification rate for classifcation
%
% 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 Elm_Type~=REGRESSION
%%%%%%%%%%%% Preprocessing the data of classification
sorted_target=sort(cat(2TTV.T)2);
label=zeros(11); % Find and save in
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7859 2014-03-03 10:27 sinc\ELM.m
文件 5059 2014-03-03 10:18 sinc\ELM_MultiOutputRegression.m
文件 3763 2014-03-03 10:18 sinc\elm_predict.m
文件 5645 2014-03-03 10:18 sinc\elm_train.m
文件 709 2014-03-03 10:18 sinc\sinc.m
文件 957 2014-03-03 10:27 sinc\sinc_mean.m
文件 114328 2014-03-03 10:27 sinc\sinc_test
文件 114518 2014-03-03 10:27 sinc\sinc_train
文件 667807 2014-03-03 13:58 sinc\unti
文件 78 2014-03-31 17:03 sinc\Unti
目录 0 2014-04-08 12:51 sinc
----------- --------- ---------- ----- ----
920723 11
相关资源
- 改进后的离散粒子群算法 (discrete
- PSO粒子群5种改进算法实例源码
- 粒子群求解电力系统机组组合优化问
- 基于粒子群算法的最短路径设计和实
- matlab 粒子群算法 路径规划
- 粒子群算法与灰狼优化结合算法PSO-
- 路径规划 matlab 粒子群算法
- 粒子群算法PSO应用于神经网络优化m
- 智能微网粒子群优化算法.zip
- MATLAB遗传粒子群GAPSOPID参数优化设计
- 标准粒子群算法matlab程序
- 基于粒子群的灰狼算法优化
- MATLAB的粒子群工具箱,包附使用文件
- 二维粒子群算法matlab源程序
- 粒子群聚类matlab
- MATLAB实现粒子群算法
- PSO SampEn ApproxiEN RVM PSO:粒子群优化算
- PSO优化pid控制器
- ELM 极限学习机matlab以及Python程序
- 模糊自适应粒子群和蚁群混合算法求
-
single-ob
jective - SS-US-ELM 最新极限学习机程序
- 遗传算法和粒子群算法代码(pso ga)
- matlab混沌粒子群优化算法
- PSO-bp 粒子群优化BP神经网络
- ELM_kernel 核极限学习机
- PSO_LSSVM
- PSO-GA 粒子群算法求解多维约束函数极
- PSO of IEEE33 IEEE33节点配电网系统中接
- ELM 极限学习机在matlab中elm函数调用示
评论
共有 条评论