crossval leaveout for SVM
Show older comments
Hi, I'm trying to code a leave one subject out cross validation after training my data with SVM. There are 15 subjects. I've read the crossval documentation but am still lost... Here is my code:
load EEG_X %features
load EEG_Y %label
Subject_index=2;
fea = X{1,Subject_index};
gnd = Y{1,Subject_index};
model = train(gnd', sparse(fea'));
c = cvpartition(15,'leaveout')
cvmodel = crossval('CVPartition',c)
I'm not sure about the relationship between cvpartition and crossval. Any help would be greatly appreciated!
Answers (0)
Categories
Find more on Classification Trees in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!