Skip to content

Fix MIDAS padding for short multivariate and sampled series - #3304

Open
AryanRG wants to merge 4 commits into
unit8co:masterfrom
AryanRG:fix/midas-short-series-padding
Open

AryanRG wants to merge 4 commits into
unit8co:masterfrom
AryanRG:fix/midas-short-series-padding

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 25, 2026

Copy link
Copy Markdown

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #3303.

Summary

Short multivariate or sampled series fail in MIDAS.fit_transform() because the padding arrays use singleton component and sample dimensions. Preserve those dimensions when creating the padding.

Added round-trip regressions for short monthly windows, quarter-start/end labels and multiple components/samples. The transformer and pipeline tests and repository pre-commit checks pass.

@AryanRG
AryanRG requested a review from dennisbader as a code owner October 25, 2026 21:16

@dennisbader dennisbader left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot for the nice fix and your first contribution @AryanRG 🚀
Everything looks good to me 💯

I added a reference to the PR in the changelog.

I'll merge once all tests have passed

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.13%. Comparing base (660b205) to head (3356da5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3304   +/-   ##
=======================================
  Coverage   97.13%   97.13%           
=======================================
  Files         175      175           
  Lines       19411    19411           
=======================================
  Hits        18855    18855           
  Misses        556      556           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

[BUG] MIDAS fails on short multivariate or sampled series

2 participants