-(Face clssification using Random Forest Technique),,,theri one problem occured during the use of Random-Forest MATLAB code,,,,,

조회 수: 1 (최근 30일)
1) what is "ytrain" and "ytest" and how to obtain it for say 20 image samples? 2) random forest would be applied on group of features (multiple images with different features) out of which it is going to extract the best feature.....right! so how exactly it is going o do so?any specified function or command for same in MATLAB? 3)refer to the piece of code given below:
rfmodel = classRF_train(xtrain,ytrain, 300,20);
rf_ypred = classRF_predict(xtest,rfmodel);
rferr = cerror(rf_ypred, ytest'); % evaluate testing error
fprintf('\nThe error from Random Forest is %f',rferr)
rf_record(repeat,1) = 1 - rferr;
end
rfCorrectRate = sum(rf_record)/nbrRepeat;
global zz
zz=zz+1;
correctRate = [rfCorrectRate];
figure(2);subplot(2,4,zz);
bar(correctRate,0.3); %0.3
set(gca, 'XTickLabel',{'RF '})
what is the role of nbrRepeat?what if the iterations are less? what do we mean by correct rate? every time correct rate shown would be 0.3.why?

답변 (1개)

Ilya
Ilya 2012년 4월 10일
1. ytrain and ytest are likely arrays of true class labels (if you have a classification problem) or arrays of observed continuous response values (if you have a regression problem) for your training and test data. I don't know how you obtain them. Ask someone with expertise in image processing.
2. This classification algorithm is provided in Statistics Toolbox in MATLAB 9a (and later) as TreeBagger.
3. You should ask the author of this script.
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 4월 24일
TreeBagger is part of the Stats toolbox in sufficiently new MATLAB (R2009a and later)
http://www.mathworks.com/help/toolbox/stats/treebagger.html

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by