[BUG]: Fix TransformedTargetRegressor update() transformer usage and transformer=None predict handling#1028
Open
direkkakkar319-ops wants to merge 4 commits intosktime:mainfrom
Conversation
…gitignore and wheelhouse artifacts
fkiraly
requested changes
Apr 2, 2026
Collaborator
fkiraly
left a comment
There was a problem hiding this comment.
Thanks for the fix!
I think the reason that this did not get caught by the tests is that the get_test_params did have no example where the regressor was capable of update, I think.
Could you add such an example?
Contributor
Author
|
@fkiraly, youu are exactly right on the likely root cause. |
Contributor
Author
|
will update |
Contributor
Author
|
so, i will be doing it by adding the 3rd params in the |
Contributor
Author
Contributor
Author
Contributor
Author
|
Hi, @fkiraly the changes you asked are done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What does this implement/fix?
This PR fixes a few issues in
TransformedTargetRegressor(skpro/regression/compose/_ttr.py) where valid usage could fail at runtime._updatenow correctly callsself.transformer_.transform(...)instead of invoking the transformer directly.transformer=None(the default), which now works consistently across:1.
_predict_predict_quantiles_predict_interval_predict_probaDataFrameindex and column structure when transformingyinside_update.I also added targeted regression tests in
skpro/regression/tests/test_ttr.pyto cover:transformer=Noneforpredictandpredict_probaupdateDoes this introduce a new dependency?
No, no new dependencies are introduced.
What should reviewers focus on?
Feedback would be especially helpful on:
transformer=Nonehandling across prediction methods_updatebehavior with sklearn-style transformers (transform,inverse_transform)ypath is appropriateTests
Yes, tests have been added:
test_ttr_without_transformer_predicts_and_returns_distributiontest_ttr_update_applies_transformer_before_delegatingAdditional notes
This is a bugfix-only PR. No API changes and no new dependencies.
PR checklist
For all contributions
For new estimators
Local Test
Validation (local CI-equivalent checks)
pre-commit run --files skpro/regression/compose/_ttr.py skpro/regression/tests/test_ttr.pypassed.13406 passed, 33 skipped, 468 warningsEvidence