Why can a Random Forest regressor not extrapolate beyond the range of the training targets?
Last updated
Each prediction is an average of leaf means of training targets, so output is always bounded by the min and max training target.
Splits are piecewise constant: inputs beyond the training range fall into the outermost leaf, so predictions go flat and no trend continues.
Fixes: detrend or fit a linear model first and model residuals with the forest, or use linear-leaf trees (LightGBM
linear_tree).