You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's simple, the TransformedTargetRegressor forces you to fit. I'm in a scenario where i want to multiply the outputted value by some number, but i don't want to check my test scores with the transformed targets, so when deploying my model I wrap it in TransformedTargetRegressor.
Yet, that forces me to fit, my transformer and my estimator (which they already are). Does it make sense to allow this use case? It seems weird that the implementation doesn't check if the regressor and transformer themselves are fitted but only checks if they are set
Steps/Code to Reproduce
target = TransformedTargetRegressor(transformer=multiplier, regressor=fit_regressor)
# target.predict(..) now fails
# my workaround
target.regressor_ = fit_regressor # otherwise check_is_fitted fails (╯°□°)╯︵ ┻━┻
target.transformer_ = multiplier # same as above
target._training_dim = 2 # column vector for regression
Thanks for your awesome project!
EDIT: had to add the training dim as well
The text was updated successfully, but these errors were encountered:
Description
It's simple, the TransformedTargetRegressor forces you to fit. I'm in a scenario where i want to multiply the outputted value by some number, but i don't want to check my test scores with the transformed targets, so when deploying my model I wrap it in TransformedTargetRegressor.
Yet, that forces me to fit, my transformer and my estimator (which they already are). Does it make sense to allow this use case? It seems weird that the implementation doesn't check if the regressor and transformer themselves are fitted but only checks if they are set
Steps/Code to Reproduce
Thanks for your awesome project!
EDIT: had to add the training dim as well
The text was updated successfully, but these errors were encountered: