Skip to content

Conversation

kryggird
Copy link
Contributor

Reference Issues/PRs

Fixes 26530.

What does this implement/fix? Explain your changes.

This PR uses the existing self._training_dim to decide whether to squeeze y before passing it the inner regressor in TransformedTargetRegressor.

Any other comments?

I've also added a test in test_metaestimators_metadata_routing.py.

@betatim @glemaitre

Copy link

github-actions bot commented Jun 16, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: bbcb234. Link to the linter CI: here

@betatim
Copy link
Member

betatim commented Jun 17, 2025

Thanks for the Pull Request @kryggird! If you have the time, could you take a look at the linter's complaints - it has instructions on how to install and run the linters as well which in 99.9% will automagically fix all the complaints.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @kryggird. I just moved the test you added into the TranformedTargetRegressor dedicated test file.

Please add a changelog entry. LGTM otherwise.

@jeremiedbb jeremiedbb merged commit 29b379a into scikit-learn:main Jul 28, 2025
36 checks passed
@jeremiedbb jeremiedbb modified the milestone: 1.7.2 Aug 4, 2025
lucyleeow pushed a commit to lucyleeow/scikit-learn that referenced this pull request Aug 22, 2025
…earn#31563)

Co-authored-by: Jérémie du Boisberranger <jeremie@probabl.ai>
jeremiedbb added a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 3, 2025
…earn#31563)

Co-authored-by: Jérémie du Boisberranger <jeremie@probabl.ai>
@jeremiedbb jeremiedbb mentioned this pull request Sep 3, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TransformedTargetRegressor forces 1d y shape to regressor
3 participants