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
[FEATURE] Pass additional parameters to fit underlying estimator in EstimatorTransformer
#530
Comments
EstimatorTransformer
EstimatorTransformer
Ok, no problem! Will keep that in mind. |
It's a bit of an sklearn antipattern to pass lots of settings via |
XGBoost is a 3rd party library maintained by dmlc. I agree hyperparameters shouldn't be passed via Other example use cases include CatBoost parameters and Lightgbm parameters that can only be passed through UPDATE: From looking at scikit-learn source code it seems |
I'm a bit uneasy to extend this library beyond scikit-learn because the dependencies quickly start to stack up. @MBrouns what's your opinion on this? |
sklearn does describe the use of |
TIL. Yeah so if scikit-learn supports |
Either option is fine. Just as long as an issue is discussed before a solution is implemented. |
Oh! And one more thing. If you're adding this behavior to the estimator transformer, could you also add it to the estimatorpredictor? |
Sure! Will check that out tomorrow. Do you mean pass |
This issue is about the |
Yes, but what exactly do you mean by estimatorpredictor otherwise? Don't see an |
Ah! Crud. My bad. I was confused with the Grouped variant of the meta estimators. These come with a predictor variant. Please ignore the previous comment. |
Aha, thanks for clearing that up! Then I think we are ready for the PR. Will create a fresh one. |
In
EstimatorTransformer
the underlying estimator is being fitted without the ability to pass along additional arguments toself.estimator_.fit
.This limits use cases for
EstimatorTransformer
. For example, if the underlying estimator is anXGBClassifier
we would like to be able to passeval_set
to monitor validation performance and enable early stopping. This is currently not possible. Adding*args, **kwargs
should fix this issue.scikit-lego/sklego/meta/estimator_transformer.py
Line 31 in b4d087f
The text was updated successfully, but these errors were encountered: