I have a code
load('fisheriris'); y = species; X = meas; cp = cvpartition(y,'k',10); % Stratified cross-validation
classf = TreeBagger(10,meas,species,'oobpred','on'); cvMCR = crossval('mcr',X,y,'predfun',classf,'partition',cp)
i get error as
Undefined function 'func2str' for input arguments of type 'TreeBagger'. Error in crossval>evalFun (line 465) error(message('stats:crossval:FunError', func2str( fun ), ME.message));
Best Answer