Poisson criterion in RandomForestRegressor
See original GitHub issueDescribe the workflow you want to enable
I want to officially use the Poisson splitting criterion in RandomForestRegressor
.
Describe your proposed solution
#17386 implemented the poisson splitting criterion for DecisionTreeRegressor
and ExtraTreeRegressor
. This also enabled—somewhat silently—to do:
import numpy as np
from sklearn.ensemble import RandomForestRegressor
y = [0, 1, 2]
X = np.arange(6).reshape(3, 2)
rf = RandomForestRegressor(criterion="poisson")
rf.fit(X, y)
Note: The same is true for ensemble.ExtraTreesRegressor
.
Tasks:
- Add the poisson splitting criterion to the docstring of
RandomForestRegressor
. - Add input validation (non-negative
y
) toRandomForestRegressor
. - Expand the tests for
RandomForestRegressor
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (13 by maintainers)
Top Results From Across the Web
sklearn.ensemble.RandomForestRegressor
New in version 1.0: Poisson criterion. max_depthint, default=None. The maximum depth of the tree. If None, then nodes are expanded until all leaves...
Read more >Random Forest Regressor - criterion() function. - Kaggle
The function to measure the quality of a split. Supported criteria are “mse” for the mean squared error, which is equal to variance...
Read more >In Poisson models with an offset, should performance metrics ...
... metrics that can compare a standard Poisson regression (with population offset) to a random forest regressor with Poisson criterion.
Read more >Regression trees and forests for non-homogeneous Poisson ...
We propose tree and random forest methods for non-homogeneous Poisson processes. The splitting criterion is derived from a model with a piecewise constant ......
Read more >Regression trees and forests for non ... - ResearchGate
We propose tree and random forest methods for non-homogeneous Poisson processes. The splitting criterion is derived from a model with a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @lorentzenchr! Apologies for the delay in getting around to this. Opened a pull request like you’d suggested. Done everything other than expanding the test suite. Let me know what you think and whether you’d be able to review. Thanks!
@pk1130 Welcome. I hope your motivation keeps on going. You’ll find general advice in the developer’s guide for contributing. The
class RandomForestRegressor
lives in sklearn/ensemble/_forest.py. Input validation should happen indef fit(..)
which is inherited fromclass BaseForest
. So you need to adapt the code there. I would start with adding the poisson criterion to the docstring ofRandomForestRegressor
. Let me know if you need more guidance.