Click here to Skip to main content
15,888,105 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How I can classify a data set (has 11 classes) using SVM with kfold method? Any help to modify below code will be appreciated.

C#
N = 1500; % Number of samples
indices = crossvalind('Kfold', train_label, N);
    for i = 1:N
        Test = (indices == i);
        Train = ~Test;
        SVMStruct = svmtrain(Data_Set (Train,:), train_label (Train,:));
        Age = svmclassify(SVMStruct, Data_Set (Test,:));
    end
Posted
Updated 2-Oct-15 11:39am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900