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

GradientBoosting with SKORCH #787

Closed
francescamanni1989 opened this issue Jul 2, 2021 · 5 comments
Closed

GradientBoosting with SKORCH #787

francescamanni1989 opened this issue Jul 2, 2021 · 5 comments

Comments

@francescamanni1989
Copy link

francescamanni1989 commented Jul 2, 2021

I would like to use skorch to implement Sklearn's GradientBoosting methods on torch based models.
Here is my first implementation on MNIST dataset, based on a previous solved issue on ADABoost for Skorch.
Capture

However I keep getting this error:
Capture

I tried to solve it, but I don't understand exactly why there is the incompatibility.

@thomasjpfan
Copy link
Member

scikit-learn's GradientBoostingClassifier does not support changing the base estimator. The implementation only works with trees.

@BenjaminBossan
Copy link
Collaborator

Did you mean to use AdaBoostingClassifier?

@francescamanni1989
Copy link
Author

Thanks for your prompt reply. I mean GradientBoostingClassifier. I though it could support a change on the base estimator by using Skorch since it does when using Ensemble-Pytorch.

@BenjaminBossan
Copy link
Collaborator

No, this does not work unfortunately. You can only change the loss, which should be a string, which is why you saw the error message above.

Given that we can't do anything about this situation on the skorch side, I'll close the issue. If you have further questions, feel free to re-open.

@francescamanni1989
Copy link
Author

No, this does not work unfortunately. You can only change the loss, which should be a string, which is why you saw the error message above.

Given that we can't do anything about this situation on the skorch side, I'll close the issue. If you have further questions, feel free to re-open.

Is that the same with XGB classifier? Is it possible to adapt the base estimator and interface it with Skorch?

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

No branches or pull requests

3 participants