[BUG] Normalize decoder targets with encoder statistics - #2362
Open
mig-builds wants to merge 2 commits into
Open
[BUG] Normalize decoder targets with encoder statistics#2362mig-builds wants to merge 2 commits into
mig-builds wants to merge 2 commits into
Conversation
Fit sequence-local normalizers exclusively on encoder windows and reuse the fitted state for decoder targets. This prevents scale mismatches without leaking future target values. Add regression coverage and document the normalization behavior. Refs sktime#2360
mig-builds
requested review from
benHeid,
fkiraly,
jdb78 and
phoeenniixx
as code owners
July 29, 2026 21:30
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2362 +/- ##
=======================================
Coverage ? 87.37%
=======================================
Files ? 171
Lines ? 10096
Branches ? 0
=======================================
Hits ? 8821
Misses ? 1275
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Exercise one-dimensional MultiNormalizer input and the global-normalizer passthrough path added for decoder target normalization.
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.
Reference Issues/PRs
Fixes #2360.
What does this implement/fix? Explain your changes.
EncoderDecoderTimeSeriesDataModulepreviously fittedEncoderNormalizeron each encoder window and normalizedtarget_past, butreturned the corresponding decoder target
ywithout the sequence-localnormalization.
This PR:
ScalerAdapter.transform_sequence()to transform data using analready-fitted sequence-local normalizer.
multi-target configurations.
docstring.
The decoder target is never used when fitting the normalizer, preventing future
target leakage.
What should a reviewer concentrate their feedback on?
transform_sequence()has the appropriate behavior for single andmulti-target normalizers.
with the intended
EncoderNormalizersemantics.MultiNormalizerconfigurations continue to preserve theexisting behavior for non-sequence target columns.
Did you add any tests for the change?
Yes. Added
test_encoder_normalizer_applies_to_decoder_target, which verifiesthat:
yuses the normalization parameters fitted on the encoder window.fitted state.
The complete data-module test file passes:
git diff --checkpassedAny other comments?
The documentation now explicitly states that sequence-local normalization is
fitted exclusively on encoder observations and then reused for both
target_pastand decodery.PR checklist
[ENH],[MNT],[DOC], or[BUG].hooks.