Different results when using oobPredict for TreeBagger
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I've noticed that averaging the predicted OOB responses for individual trees using 'oobPredict(B, 'trees', i)' produces different results than when using oobPredict(B, 'trees', 'all'). Ex:
b = TreeBagger(no_trees,xtrain,ytrain,'method','r','OOBVarImp','off',... 'OOBPred','on','minleaf',1); yhat_oob_tree = zeros(no_trees,numel(ytrain)); for i = 1:no_trees % one row per tree yhat_oob_tree(i,:) = oobPredict(b,'trees',i); end avg_yhat_oob_tree = mean(yhat_oob_tree); %avg. by observations(columns) yhat_oob_all = oobPredict(b);
That is, 'avg_yhat_oob_tree' and 'yhat_oob_all' are different, doen anyone why this happens?
Thank you!
0 Commenti
Risposte (1)
Ilya
il 13 Ago 2012
See http://www.mathworks.com/matlabcentral/answers/9638-difference-between-individual-and-cumulative-oobmargin-of-treebagger It's the same problem here. When you ask for obbPredict from one tree, you get predictions filled with default values for in-bag observations.
0 Commenti
Vedere anche
Categorie
Scopri di più su Classification Ensembles in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!