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

5 vues (au cours des 30 derniers jours)
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?

Réponses (1)

Ilya
Ilya le 10 Avr 2012
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 commentaires
Walter Roberson
Walter Roberson le 24 Avr 2012
TreeBagger is part of the Stats toolbox in sufficiently new MATLAB (R2009a and later)
http://www.mathworks.com/help/toolbox/stats/treebagger.html

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by