Skip to content

fix: support multi-series X for aligner fit - #514

Open
Saswatsusmoy wants to merge 1 commit into
sktime:mainfrom
Saswatsusmoy:fix/491-aligner-nested-panel
Open

fix: support multi-series X for aligner fit#514
Saswatsusmoy wants to merge 1 commit into
sktime:mainfrom
Saswatsusmoy:fix/491-aligner-nested-panel

Conversation

@Saswatsusmoy

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #491

What does this implement/fix? Explain your changes.

Aligners need X as a panel / df-list (list of series). fit only resolved a single series per X_* / y_* slot and routed object_type=aligner through the forecaster-style fit(y, X=...) path. That produced the df-list type error on a single series (e.g. airline) and a signature clash when only X was set.

This change:

  • lets X_handle / X_dataset be a string or a list of ids
  • assembles a df-list for list inputs (Series → one-column DataFrame)
  • routes aligners to fit(X) with a clear error on a single series/table
  • extends call_method *_dataset / *_data_handle injection the same way for multi-series lists

Shared resolve is used by sync fit and fit_async. Tests use AlignerNaive (no soft deps).

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

  • List resolve for X_handle / X_dataset and Series → DataFrame for df-list items
  • Aligner branch in Executor.fit (including single flat DataFrame vs MultiIndex panel)
  • call_method list injection parity with fit (len >= 2)

Any other comments?

make check is green locally (206 tests). Commit-time pre-commit passed on this branch.

PR checklist

For all contributions
  • I've added unit tests and made sure they pass locally (make check).
  • I've added the tool to the online documentation in docs/source/. n/a (schema/description only on the existing fit tool; no new tool)
  • I've updated the existing example scripts or provided a new one to showcase how my tool works in examples/. n/a

Aligners need X as a list of series (df-list). fit only resolved a
single series and routed aligners through the forecaster fit path, so
airline and similar inputs failed mtype checks.

Allow X_handle/X_dataset as a list of ids, assemble df-list (Series to
frame), route object_type=aligner to fit(X), and extend call_method
injection the same way. Tests cover the issue path and list inputs.
@Saswatsusmoy

Copy link
Copy Markdown
Contributor Author

one caveat for reviewers / users: a single series (e.g. y_dataset=airline alone) still fails, on purpose. aligners need multiple series, so we return a short error asking for X_handle or X_dataset as a list of at least two ids. the bug was never being able to pass that list and wrong fit routing. multi-series list path is what this pr fixes.

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]The Aligner Limitation (Nested Panel Data)

1 participant