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

New to MATLAB?

Thread Subject:
some help please!!!!!

Subject: some help please!!!!!

From: yafit maymon

Date: 13 Apr, 2011 14:42:05

Message: 1 of 1


i am using svm and would like to know how can i run the code wrriten down- number of times (in a loop ) and calculate in the end the average of cp.ErrorRate (which is an item in object cp)- can i keep each time the cp.ErrorRate in a vector ? how can i do it???

the code is:
indices = crossvalind( 'Kfold',groups1,3);
cp = classperf ( groups1 );
for i = 1:3 test = (indices == i); train = ~test
svmStruct = svmtrain ( mat1 ( train,:) , groups1 ( train ), 'kernel_function' ,'quadratic' ,'BoxConstraint',50)
classes = svmclassify ( svmStruct , mat1 (test,:) )
classperf ( cp , classes ,test )


Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us