Skip to content
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

Add GradientBoostingRegressor #11

Closed
interesaaat opened this issue Apr 2, 2020 · 3 comments · Fixed by #88
Closed

Add GradientBoostingRegressor #11

interesaaat opened this issue Apr 2, 2020 · 3 comments · Fixed by #88
Labels
good first issue Good for newcomers

Comments

@interesaaat
Copy link
Collaborator

No description provided.

@interesaaat interesaaat added the good first issue Good for newcomers label Apr 10, 2020
@bfgray3
Copy link
Contributor

bfgray3 commented May 30, 2020

I'd enjoy working on this feature if nobody has started on it yet.

@interesaaat
Copy link
Collaborator Author

Go for it!

@NicolasHug
Copy link

NicolasHug commented May 30, 2020

GradientBoostingRegressor has an init argument https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor.html that specifies the first estimator that is used to initialize the predictions, before the first GB iteration.

I think treelite raises an error when the init argument is different form zero. I haven't checked with them directly but I assume it's because they can only compile trees, not arbitrary estimators.

Would this be an issue with hummingbird as well?

Regarding #64: the HistGradientBoosting estimators don't accept an init parameter, but they do have an internal _baseline_prediction which usually corresponds to the average of the target and which is automatically added to any prediction. This thing isn't a tree and it isn't part of the _predictors list, it's just a private float attribute (EDIT: in multiclass settings it's an array of size n_classes). So maybe #64 will need to take care of that manually?

Alternatively I think we could consider converting _baseline_prediction into a single-node tree in sklearn (I don't think we can do much internally about init though :/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants