Replace option in fitrensemble
94 ビュー (過去 30 日間)
古いコメントを表示
What would be the right syntax to train a regression ensemble without replacing the predictors? According to the help article on "fitrensemble", the command
fitrensemble(X, Y, 'Method','Bag','NumLearningCycles',NTREE, 'Replace','off', 'Resample','on')
should do it. However, when I look at trees generated by the function, I find that some predictors are used multiple times. Is there a way to avoid it?
Thanks.
0 件のコメント
回答 (1 件)
the cyclist
2023 年 3 月 10 日
I'm confused.
It sounds like you saying that you don't want a given predictor to occur at different branching points. For example, you are trying to avoid a model where the first branching point could be a split between x<0 and x>=0, and then a later branching point further splits the x>=0 branch between x<15 and x>=15. Is that right?
I'm not an expert in the fitrensemble function, but I'm pretty sure that that has nothing to do with the resample/replace parameters you are setting. Resampling has to do with whether observations are resampled, not whether predictors are "re-used".
Or maybe I am just totally misunderstanding what you want.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Regression Tree Ensembles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!