Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Error-Performing cross validation rbf

Asked by FIR on 28 Aug 2012
I have a set of code 
load fisheriris
   indices = crossvalind('Kfold',species,10);
    group1=[1;2;2;1;1;2;1;2;1;2]
   group = cellstr(num2str(group1))
   cp = classperf(species); 
for i = 1:10
     test = (indices == i); train = ~test;
net = newrb(meas(:,1),group1);
b=meas(:,3);
   Y=sim(net,b);
classperf(cp,Y,test); 
end
but i get error ,please help
Error using ==> classperf at 163
When class labels of the CP object is a cell array of strings and
the classifier output is a numeric array, it must contain valid
indices of the class labels or NaNs for inconclusive results.
Error in ==> Untitled at 13
classperf(cp,Y,test) 

2 Comments

Oleg Komarov on 5 Sep 2012

What's crossvalind?

FIR on 6 Sep 2012

i did not understand as u said

FIR

Tags

Products

No products are associated with this question.

0 Answers

Contact us