Replace option in fitrensemble

94 ビュー (過去 30 日間)
Val
Val 2023 年 3 月 9 日
回答済み: the cyclist 2023 年 3 月 10 日
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.

回答 (1 件)

the cyclist
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.

カテゴリ

Help Center および File ExchangeRegression Tree Ensembles についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by