-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Poisson criterion in RandomForestRegressor #19304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
take |
Isn't that taken care of by the DecisionTreeRegressor instances? |
Hey guys! I'm new to open source contributions, and I'd love to contribute to this issue (the reason I took this up as soon as it was posted :)). I'm an avid machine learning enthusiast and scikit-learn user! Any tips for a newcomer like me? Since I'm not fully familiar with the entire codebase, it's taking me a little while to navigate my way around here. |
import numpy as np
from sklearn.ensemble import RandomForestRegressor
X = np.array([[1, 2, 3]]).T
y = [-1, 0, 1]
rf = RandomForestRegressor(criterion="poisson", random_state=4)
rf.fit(X, y)
rf.predict(X) gives |
@pk1130 Welcome. I hope your motivation keeps on going. |
@lorentzenchr Thanks for the welcome and the quick direction to parts of the codebase. I was reading through |
@pk1130 Could you open a PR or can I help you somehow? |
@lorentzenchr Sorry for the delayed response. Last couple days have been crazy with me injuring my ankle ligament. Couldn't get to this sooner. I've updated the docstring as you'd suggested and I'm figuring out how to add input validation. I'm guessing it's fairly trivial but since I'm relatively new to the codebase, just figuring it out. Haven't looked at the test suite yet to expand on it. Let me know if there's some initial work I can get done before today's sprint meeting. |
@pk1130 Easy, there is no rush and good recovery for you foot. If you open a PR, it is easier to help out. In order to open one, you push your branch to your forked repository on github, then you can add a pull request to scikit-learn from github (on your fork). |
hi @lorentzenchr can I start working on this? |
@designer1234 This issue is currently taken by @pk1130 as you can see under Assignees. So you can ask him and offer our help. |
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! |
hi @lorentzenchr @pk1130 ! I'm new to the scikit-learn repo, and would love to help contribute. I was wondering if this ticket was open for additional help? If so, what could I do to help? |
thank you @lorentzenchr ! I might just need a bit of time to get more familiar with the code base, but will be putting in some time this & next week. |
@bsun94 Great. It is usually advantageous to open/have a PR early such that we can help you there. |
Hi there! I'd put in a PR inclusive of a test - please let me know if it looks good! |
… well as updated whats_new for scikit-learn#19304
Closed in #19836. |
Describe 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
andExtraTreeRegressor
. This also enabled—somewhat silently—to do:Note: The same is true for
ensemble.ExtraTreesRegressor
.Tasks:
RandomForestRegressor
.y
) toRandomForestRegressor
.RandomForestRegressor
.The text was updated successfully, but these errors were encountered: