-
Notifications
You must be signed in to change notification settings - Fork 63
[ENH] skforecast integration for time series hyperparameter tuning
#208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[ENH] skforecast integration for time series hyperparameter tuning
#208
Conversation
src/hyperactive/experiment/integrations/skforecast_forecasting.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great!
- please improve docstrings, see above, and also include defaults
- please add
get_test_paramswith sensible settings to test the experiment and the forecaster - please fix code quality issues, use
pre-commit
skforecast integration for time series hyperparameter tuning
|
Hi @fkiraly !! added tested the pre-commit on changed files kindly verify this. |
fkiraly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the tests to run, you need to add skforecast to the python environment - I would add it to sktime-integration in pyproject.toml, that might be easiest.
|
Hi @fkiraly !! commited the changes as you suggested
|
|
Hi, |
|
Hi @JoaquinAmatRodrigo !!! |


Summary
This PR adds a full integration with skforecast, allowing Hyperactive to optimize hyperparameters of skforecast forecasting models using any of its optimization algorithms.
Implementation Details
SkforecastExperiment (skforecast_forecasting.py)
BaseExperiment.skforecast.model_selection.backtesting_forecasterinside_evaluate()to perform time-series cross-validation for each parameter set.set_params()before every evaluation.SkforecastOptCV (skforecast_opt_cv.py)
sklearn-style estimator (inherits from
BaseEstimator).Works with
ForecasterRecursiveand other compatible skforecast forecasters.fit():
SkforecastExperimentwith user settings (steps,initial_train_size,metric, etc.).predict():
best_forecaster_.predict()for easy forecasting after optimization.Configuration
pyproject.tomlunder theintegrationsextra.Verification
skforecast_example.pyshowing a HillClimbing search withForecasterRecursive+RandomForestRegressor.Closes
Fixes #199