Skip to content

fix(regressor): correctly cap the labels in predict #1662

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

Merged
merged 6 commits into from
Apr 18, 2023

Conversation

aron-bram
Copy link
Collaborator

Fixes #1657

As @ftmtas212 pointed it out in the issue above, we had a bug in our predict method of our regression pipeline.
Namely, we capped the predicted labels incorrectly, as the code did not account for cases when the maximum of the labels seen during training were negative.

This PR fixes it, by considering the same logic used for capping predicted labels from the bottom. It also adds a documentation for the function.

In the future we should consider using TransformedTargetRegressor, instead of manually manipulating the predictions.

@aron-bram aron-bram requested a review from eddiebergman April 18, 2023 10:23
@aron-bram aron-bram merged commit 6732112 into development Apr 18, 2023
@eddiebergman eddiebergman deleted the fix_regressor_predict branch April 18, 2023 11:41
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

Successfully merging this pull request may close these issues.

[Question] restriction of y_max
1 participant