Error using ELM Too many input arguments.

please help me to fix this code:
clc;
clear;
close all;
%TRAINING PROCESS EXTREME LEARNING MACHINE
%Mengambil Data Latih Bentuk
dt_bentuk = xlsread('inputbentuk.xls');
%Menentukan Parameter dan Kelas Target Data Latih
x1=dt_bentuk(:,1:8); %Parameter
t1=dt_bentuk(:,9); %Kelas
%Menyusun Data Latih
data_training = [x1,t1];
%Menyusun Parameter ELM
NumberofInputNeurons = 8;
NumberofHiddenNeurons = 200;
% bobot diinisialisasi secara random
InputWeight = rand(NumberofHiddenNeurons,NumberofInputNeurons)*2-1;
BiasofHiddenNeurons = rand(NumberofHiddenNeurons,1);
% bobot ditetapkan di awal
load bobotawal
Elm_Type = 1;
ActivationFunction = 'sin';
% pelatihan elm
[~, ~, ~, ~, predicted_class] = ...
ELM(data_training, data_training, ...
InputWeight, BiasofHiddenNeurons, Elm_Type,...
ActivationFunction);
% menghitung akurasi pelatihan
[~,n] = find(predicted_class==kelas);
akurasi = numel(n)/jumlah_file*100;
disp(['akurasi pelatihan = ',num2str(akurasi),'%'])
% menyimpan variabel2 pelatihan
save('net','data_training','InputWeight','BiasofHiddenNeurons',...
'Elm_Type','ActivationFunction')

Respuestas (1)

Voss
Voss el 24 de Jun. de 2022
I assume you are using ELM.m from here:
Note that that function takes five inputs:
% 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)
And you have given it six inputs:
[~, ~, ~, ~, predicted_class] = ...
ELM(data_training, data_training, ... % 1 and 2 (both identical)
InputWeight, BiasofHiddenNeurons, Elm_Type,... % 3, 4 and 5
ActivationFunction); % 6
Check the inputs you are giving ELM.m.

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 24 de Jun. de 2022

Respondida:

el 24 de Jun. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by