Skip to content

[BUG] Support dynamic exogenous features in transfer intervals - #722

Open
janrth wants to merge 3 commits into
Nixtla:mainfrom
janrth:bug/interval_transfer
Open

[BUG] Support dynamic exogenous features in transfer intervals#722
janrth wants to merge 3 commits into
Nixtla:mainfrom
janrth:bug/interval_transfer

Conversation

@janrth

@janrth janrth commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #721.

Transfer conformal prediction could not handle dynamic exogenous inputs consistently:

  • recalibrate and error_scaled run a frozen target-domain backtest, but its nested predictions did not receive the validation fold's future dynamic inputs.
  • weighted_conformal and scale_aligned_weighted preprocess target history for density-ratio estimation, but did not preserve the source model's fitted static/dynamic feature configuration.

This PR keeps the fix local to transfer-conformal internals:

  • _frozen_backtest resolves dynamic model-input columns from the fitted feature schema once, then passes each validation fold's values as X_df to its nested prediction.
  • The weighted-transfer preprocessing callback preserves the fitted id_col, time_col, target_col, and static_features configuration.

Ordinary predict() and ordinary cross_validation() behavior are unchanged.

Behavior

All five transfer methods now work with dynamic exogenous features:

  • recalibrate
  • error_scaled
  • scale_aligned
  • weighted_conformal
  • scale_aligned_weighted

The added regression test uses a deterministic linear system with a dynamic input and verifies that every method creates interval columns while leaving point forecasts identical to the plain forecast.

@codspeed-hq

codspeed-hq Bot commented Aug 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 12 untouched benchmarks


Comparing janrth:bug/interval_transfer (a855643) with main (eff8ddb)

Open in CodSpeed
@janrth
janrth marked this pull request as ready for review August 21, 2026 20:11
@janrth janrth changed the title Support dynamic exogenous features in transfer intervals Aug 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aab2149ae3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mlforecast/forecast.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant