load fisheririsdata = [meas(:,1), meas(:,2)];groups = ismember(species,'setosa'); % create a new column vector,
% groups, to classify data into two groups: Setosa and non-Setosa.
*_Instead of two group, classify data in three group --sentosa,versicolor,virginica-- what is other change in code_*[train, test] = crossvalind('holdOut',groups);cp = classperf(groups);classperf(cp,classes,test);cp.CorrectRatesvmStruct = svmtrain(data(train,:),groups(train),... 'showplot',true,'boxconstraint',1e6);classes = svmclassify(svmStruct,data(test,:),'showplot',true);classperf(cp,classes,test);cp.CorrectRate
ThANks u
Best Answer