MATLAB Answers


how to classify the data using extreme learning machine

Asked by Nivhedhitha on 17 Aug 2013
Latest activity Commented on by berghout tarek on 13 Aug 2018 at 9:34

pls help me how to train and test data and classify using extreme learning machine. i have downloaded the code from net.but i cant get the result. thank you.


Sign in to comment.

4 Answers

Answer by kash
on 17 Aug 2013
 Accepted Answer

You can check this link for ELM source codes


i am using the codes you specified.but i cant understand where and how to give the target. i have 20*1 matrix for training and having 20 hidden neurons.i should get 20*1 matrix for target.but it generates 20*20 matrix. thank you..

ELM code specified gives you the accuracies of training and testing,and time taken,you have to specify the training and test data with the kenrels you need

in elm_kernel code they make kind of sorting of targets


so it would be difficult to restore order of predicted classes later. Do you have maybe a code which produces predicted classes in proper ordrer ??

Sign in to comment.

Answer by VIVEK
on 27 Mar 2015
Edited by VIVEK
on 27 Mar 2015

i need to design classifier on 169rows*8col features as one data set, i had downloaded above mentioned ELM code using that link,i don't know how to define the function and how to work this code please give some suggestion, thank you


Well you can modify the code as per your convenience,like changing the format of the input data..and to run the algorithm you just need to call the function with proper no of hidden neuron and regularization parameter

I am trying to implement SaDE_ELM(Evolutionary ELM) so what value should I set to parameters( Max_FES, Lbound, Ubound, NP, Max_Gen, F_par, CR, strategy, numst)

Sign in to comment.

Answer by berghout tarek on 4 Feb 2018

in the training and testing files , you must reorder your observations like this: observation=target,attribute 01,attribute 2,..etc ELM algorithm can gives the performance during training and testing; ELM for classification can create a different targets for each class ,ex: [-1 1] for first class and [1 -1] for second class . if you want to see your sample class you must sort out the variable output TV.T; than compare it to the first target that generated during training TV;


Can you please elaborate on sorted_target or reordering of training and testing sets. If data size is 132*152 then how 1st column is treated as target (as it signifies data only)?

if you have a training set of 132*152 of samples, firstly you have to divide it into two data sets the training and testing sets, generally the training set took 80% and 20% for testing, please follow these steps: 1-you must makes sure that each instances of your data is putted in raws and the parameters in columns 2-devide you set into two sets for example : the training set is an 100*152 samples and the testing set is 32*152 samples. 3- do not for get to bring the target colomn into the first colmn of the dataset first. 4-in the algorithm of Huang bin yang in case of regression the sort of variables of targets can not affect too much on the learning process. 5-than unleash the learning and testing processes. 6-notes : ELM machine dependes on solving a leanear problems using Moore-penerose method if x is the input and the target is y then : y=(G(x* input weigths))*output weigths. but during the test our goal is to determine the output weights than we should search for the best way to find it, Moore peneroose achieves butter results but if the number of neurons is huge. I hope that it is helpful and thanks

What is the use of below code in ELM implementation: if Elm_Type~=REGRESSION

    label=zeros(1,1);                               %   Find and save in 'label' class label from training and testing data sets
    for i = 2:(NumberofTrainingData+NumberofTestingData)
        if sorted_target(1,i) ~= label(1,j)
            label(1,j) = sorted_target(1,i);
Why sorting is required for data I am not able to understand that.

Sign in to comment.

Answer by berghout tarek on 13 Aug 2018 at 9:32

if you choose your ELM network to be in regression type, that is in data set you are searching for a function that takes each instance X to the target Y,and Y represent a value for example: the image of X=(0.25 0.8 0.9) is 0.1. as a conclusion in leaner regression we are searching for an unknown function using labeled data (each instance has its own image) , unlike classification where we are searching for the class that this instance belongs to, and this class could be 1 or 2 or a or b (just an identity for the class) thank you very much may email address is but usually I don't verify it too much

  1 Comment

sorting is recommended but not obligated

Sign in to comment.