-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
TransforemdTargetRegressor fit calls to transformer.fit twice #11618
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
This is intentionally used to check the inversion as a form of input validation. It can be disabled with a parameter. In what context is this severely problematic? |
then shouldn't
Let say I have a transformer with heavy fit (e.g. sparse dictionary learning) and I am doing grid search cross-validation for hyper parameter tuning which includes transformer parameter as well. I wouldn't want to fit my transformer twice every time. |
No, the check_inverse logic should be in FunctionTransformer, but I agree that if your snippet is right, this seems to be a bug |
No maybe it's not about FunctionTransformer. I'm not sitting down now to try replicate/debug |
The fitting should be done in the |
@vahidbas Thanks for reporting |
Description
Once transformer fit is done here and again here during fit_transform. I don't think this is intended as fitting can be costly and there is no reason to repeat it for the same data.
Steps/Code to Reproduce
returns:
Expected Results
The text was updated successfully, but these errors were encountered: