Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get misclassification rate in each fold of cross validation?

I am currently using this syntax in matlab to get misclassification rate in 10-fold cross validation :

target = [repmat(1,ntrial,1);repmat(2,ntrial,1)];
cvo = cvpartition(target,'k',10);
func = @(XTRAIN,ytrain,XTEST)(classify(XTEST,XTRAIN,ytrain));
mcr = crossval('mcr',pooling,target,'predfun',func,'partition',cvo);

(where 'pooling' is the 2-class feature set I'd like to classify with the classifier)

From what I read, mcr will return the average misclassification rate from 10 folds. Now if I want to get the misclassification rate from each fold, what should I do?

Thank you in advance.

like image 818
Neu Avatar asked Nov 13 '22 16:11

Neu


1 Answers

I would say that in this case you would like to have a bit more control over the training/validation process. Have you considered breaking down the process for more control? Start with cvpartition to create the 10-folds for cross validation and then act on each fold separately.

like image 118
Shai Avatar answered Nov 15 '22 08:11

Shai