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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With