Skip to content

Conversation

@anirudhsengar
Copy link

@anirudhsengar anirudhsengar commented Nov 16, 2025

Summary

Extend ForecastingOptCV to expose sktime’s broadcasting controls plus richer post-fit diagnostics, aligning it more closely with ForecastingGridSearchCV while keeping Hyperactive optimizers in play. Also document the new knobs and assert the behavior via integration tests.

Changes

  • Broadcasting flags: Added tune_by_instance/tune_by_variable init params. When sktime is available we reuse its delegated tagging (_set_delegated_tags + _extend_to_all_scitypes) so panel/multivariate broadcasting follows the native implementation rather than a bespoke copy.
  • Returned attributes: fit now records scorer_, n_splits_, best_index_, best_score_, best_params_, best_forecaster_, refit_time_, and a cv_results_ table (the backtesting results for the winning configuration). We time refits with time.perf_counter and keep the optimizer’s best index when available.
  • Docs & tests: README.md explains the new parameters/diagnostics. test_sktime_estimators.py gained regression tests to ensure the attributes populate and the tune-by flags adjust estimator tags.

Related Issues

Fixes #198

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Nice!

Though, I think there is already automatic broadcasting in sktime - this should be activated, instead of reimplementing it.

Have a look at BaseGridSearch in sktime, and the __init__ code which handles tune_by_variable and tune_by_instance (the latter via _extend_to_all_scitypes).

@fkiraly fkiraly added enhancement New feature or request module:integrations Integrations for applying optimization to other libraries labels Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request module:integrations Integrations for applying optimization to other libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] extend sktime ForecastingOptCV with broadcasting options and returned parameters

2 participants