Recommand · October 20, 2021 0

Stacking machine learning models based on residuals of the first one – R

For a regression problem, I want to try a linear regression whose fitting errors (residuals) will be used as input into another regression model, for instance a random forest. The features used in boths models are the same. Any idea on how to do it in R ?

I guess, that final accuracy of this enssemble would be the sum of each of the models acuracy.

Thank you