Description
Describe the issue linked to the documentation
The RandomForestRegressor documentation states:
When set to True, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new forest.
This is also true for all classes that derive from BaseForest
, such as RandomForestClassifier
and RandomTreesEmbedding
.
However, the source code does not reflect this behavior. When n_more_estimators == 0
, it does not fit a new forest and instead just recomputes the OOB score if applicable.
Suggest a potential alternative/fix
There are two potential fixes:
- Reword the documentation to state:
When set to True, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, reuse the existing ensemble.
- Modify the actual behavior of this method to fit a new forest in the case where
n_more_estimators == 0
to reflect the existing documentation.