edit-error in classifier
이전 댓글 표시
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));
채택된 답변
추가 답변 (1개)
Walter Roberson
2012년 4월 12일
0 개 추천
The 'predfun' parameter expects a function handle as the associated value. Instead you passed in a TreeBagger object.
카테고리
도움말 센터 및 File Exchange에서 Classification Ensembles에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!