Replace option in fitrensemble

조회 수: 12 (최근 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 CenterFile Exchange에서 Regression Tree Ensembles에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by