edit-error in classifier
Mostrar comentarios más antiguos
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));
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 12 de Abr. de 2012
0 votos
The 'predfun' parameter expects a function handle as the associated value. Instead you passed in a TreeBagger object.
1 comentario
FIR
el 12 de Abr. de 2012
Categorías
Más información sobre Classification Ensembles en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!