Skip to content

Changelog¶

All significant changes to this project are documented in this release file.

Legend
Feature New feature
Enhancement Improvement in existing functionality
API Change Changes in the API
Fix Bug fix
Docs Documentation improvement

0.26.0 Oct 8, 2026¶

The main changes in this release are:

  • Feature New functions get_model_info and list_adapters in skforecast.foundation to query the capabilities and requirements of the foundation models (exogenous variable support, quantiles, backend package, license) without installing the backend or loading the weights. (#1324)

  • Feature The skforecast workflow skills can be installed in your own coding agent, as a Claude Code plugin or with npx skills add skforecast/skforecast/skills, and the documentation is available in Context7. User guide (#1351)

  • Enhancement Faster ForecasterRecursiveMultiSeries with many series: with 500 series, fit is 10 to 22% faster with LightGBM (more than 10 times with series_weights) and predict is 2.3 times faster (4.9 times with 5000 series). The predictions are the same. (#1342, #1363)

  • Enhancement Faster Arima: seasonal models fit 1.4 to 2.2 times faster with the same results, and the automatic order selection is about 5 times faster in series with more than 150 observations. (#1335, #1374)

  • API Change The minimum supported versions of pandas and scikit-learn are now 2.2 and 1.6 (previously 2.1 and 1.4). (#1348)

  • Fix Ets now estimates its smoothing parameters. In models without a damped trend they stayed at their starting values (alpha=0.1, beta=0.01, gamma=0.01). The estimates now agree with statsmodels and R's forecast::ets. (#1337)

  • Fix Arima models with exogenous variables returned wrong coefficients and predictions when they had two or more regressors (for example, one exogenous variable plus the intercept). They now match statsmodels SARIMAX.

  • Fix ForecasterRecursiveMultiSeries with encoding='onehot' returned wrong predictions when the series were not in alphabetical order, for example when they were named 's1' to 's10'. (#1342)

  • Docs New home page of the documentation, and the examples and tutorials pages are now a card grid with a search box and level and topic filters. (#1323)

Before upgrading

Some results change with this version, without any change in your code:

  • Ets: estimates, predictions, prediction intervals and the model chosen by the automatic selection change, because the smoothing parameters are now estimated.
  • Arima: predictions change in models with exogenous variables, a Box-Cox transformation or missing values; prediction intervals are slightly wider; and the automatic order selection can choose another model (use approximation=False to fit every candidate by maximum likelihood, as before).
  • ForecasterRecursiveMultiSeries: predictions change with encoding='onehot' when the series are not in alphabetical order, and a wide exog is now aligned with the predictions by index instead of by position.
  • select_features, select_features_multiseries and, with optuna 5.0, the Bayesian search functions can return different results for the same random_state.

And some code needs to be updated: the minimum versions of pandas, scikit-learn, numpy, statsmodels and keras are higher, cast_exog_dtypes is removed and save_forecaster names its files differently. See Changed.

Added

  • New functions get_model_info and list_adapters in skforecast.foundation. They return a FoundationModelInfo with the capabilities and requirements of a foundation model: adapter, default context_length, covariate support, supported quantiles, backend package, authentication, repository of the weights and license. list_adapters(as_frame=True) returns them as a pandas DataFrame. (#1324, #1332)

  • New argument include_drift in Arima to include a linear drift term when the order is specified manually (d + D <= 1), equivalent to include.drift in R's forecast::Arima. best_params_ now includes fit_intercept and include_drift, so set_params fits exactly the selected model.

  • The skforecast workflow skills can be installed in your own coding agent: as a Claude Code plugin (/plugin marketplace add skforecast/skforecast) or, for Cursor, GitHub Copilot, Codex, Gemini CLI and other agents, with npx skills add skforecast/skforecast/skills. The documentation is also available in Context7 as /skforecast/skforecast. User guide (#1351)

  • Added statsmodels 0.15 compatibility. (#1377)

  • Added optuna 5.0 compatibility. Its TPESampler suggests different values, so the results of the Bayesian search functions for a given random_state may differ from those obtained with optuna 4.x.

Changed

Performance

  • numba is loaded on the first use of RollingFeatures or RollingFeaturesClassification instead of when skforecast is imported, which removes around 0.3 seconds from the import of every forecaster module. (#1317)

  • fit of ForecasterRecursiveMultiSeries is faster and uses less memory with many series. With 500 series and LightGBM, it is 10 to 22% faster, about 3 times faster with encoding='onehot' and more than 10 times faster with series_weights. Results are unchanged. (#1342)

  • The prediction methods of ForecasterRecursiveMultiSeries are faster with many series: with 24 lags and 24 steps, predict is 2.3 times faster with 500 series and 4.9 times faster with 5000. (#1363)

  • Forecasters with an ExtraTreesRegressor or an ExtraTreeRegressor predict about 15 times faster (33 ms instead of 508 ms for 100 steps with 100 trees), with the same predictions. (#1363)

  • Arima is faster with identical results: seasonal models fit 1.4 to 2.2 times faster, and models with an intercept or exogenous variables up to 1.5 times faster on long series. (#1335)

  • The automatic order selection of Arima (order=None) now applies approximation as documented: when it is active (by default, more than 150 observations or m > 12), the candidates are fitted with conditional sum of squares and only the selected model by maximum likelihood, as R's forecast::auto.arima. The search is about 5 times faster and can select a different model; use approximation=False for the previous behavior. (#1374)

  • multivariate_time_series_corr is 3 to 9 times faster with method='spearman' or 'kendall', and backtesting and hyperparameter search copy a ForecasterRnn twice as fast. (#1363)

Forecasters

  • ForecasterRecursiveMultiSeries raises a ValueError when the estimator modifies the training matrix in place, for example LinearRegression(copy_X=False) or a pipeline with StandardScaler(copy=False). These estimators could give wrong residuals or search metrics without any warning. Use the default copy behavior of the estimator. (#1342)

  • In the matrices returned by create_train_X_y of ForecasterRecursiveMultiSeries, the one-hot columns of the series and the integer calendar features are now float, as in create_predict_X and in the other forecasters. (#1342)

  • set_out_sample_residuals issues a ResidualsUsageWarning when there are, on average, fewer than 10 residuals per bin, because the intervals obtained with use_binned_residuals=True are then too narrow. Provide more residuals, reduce n_bins or predict with use_binned_residuals=False. User guide (#1364)

  • The __repr__ and summary of ForecasterStats only show the estimator parameters that differ from their default values. All of them are still available in estimator_params_.

  • Corrected type hints that made static type checkers (Pyright, Pylance) report errors on valid calls, for example interval and quantiles given as tuples or lags as a numpy array. Behavior at runtime is the same. (#1379)

Statistical models

  • Arima corrects the innovation variance sigma2_ for the degrees of freedom, as R's forecast::Arima. Prediction intervals are slightly wider (1 to 4% in series of 70 to 150 observations) and closer to their nominal coverage; point predictions, coefficients and information criteria are unchanged. The maximum likelihood estimate is available in model_['sigma2_ml']. (#1365, #1369)

  • In Arima, the in-sample fitted values and residuals of the first d + D * m observations are now NaN, because they have no meaningful one-step-ahead prediction. get_score and summary ignore them.

  • The prediction intervals of Ets models with damped additive trend and additive seasonality use the analytical forecast variance, as R's forecast.ets, instead of simulated paths, so they no longer carry sampling noise. (#1371)

Feature selection

  • select_features and select_features_multiseries sample the records without replacement and keep them in their original order, so selectors with internal cross-validation no longer see the same record in train and validation. The selected features for a given random_state may differ from previous versions. (#1327)

Foundation models

  • The LicenseWarning of TabPFN-TS names the license of the weights that are actually downloaded, TabPFN-3.5 License v1.0, and tabpfn-time-series>=1.3 is the documented minimum version of the backend. (#1332)

  • The theforecastingcompany/t0* checkpoints are no longer gated on the Hugging Face Hub, so they can be used without accepting the license or authenticating. (#1332)

Save and load

  • save_forecaster keeps the dots in file_name and adds the extension of the backend: 'model_v1.2' is saved as 'model_v1.2.joblib' instead of 'model_v1.joblib', which silently overwrote 'model_v1.1'. Extensions other than those of the backends are also kept ('model.bin' is saved as 'model.bin.joblib'). User guide (#1350)

  • save_forecaster saves the .py files of the custom weight functions in the folder of the forecaster file instead of the working directory, so forecasters saved in different folders no longer overwrite each other's functions. User guide (#1353)

  • show_versions also reports the versions of scipy, statsmodels, matplotlib, torch, lightgbm, xgboost, catboost, skops and cloudpickle. (#1348)

Dependencies

  • The minimum supported versions of pandas and scikit-learn are now 2.2 and 1.6 (previously 2.1 and 1.4). With the older versions, fit failed with nullable dtypes and ExtraTreesRegressor did not handle missing values. (#1348)

  • The minimum supported versions of numpy, statsmodels and keras are now 1.26.1, 0.13.2 and 3.3 (previously 1.26, 0.13 and 3.0). The previous minimums could not be installed or failed with the other supported dependencies. (#1360)

  • Removed the function cast_exog_dtypes from skforecast.utils. It was not used by skforecast and did not work as documented. Use exog.astype(exog_dtypes) instead. (#1348)

Documentation

  • New home page and GitHub README, and the examples and tutorials pages (English, Spanish and Chinese) are a card grid with a search box and level and topic filters. The site serves its fonts and scripts from its own domain, so visitors no longer connect to third parties. (#1323)

Fixed

Forecasters

  • Fixed an issue in the forecasters with an XGBRegressor where the predictions differed from those of XGBRegressor.predict: all the trees were used even when early stopping had selected a better iteration, and a missing value set by the user was ignored. booster='gblinear' raised an XGBoostError. (#1344)

  • Fixed an issue where a user subclass of a scikit-learn linear model, RandomForestRegressor or DecisionTreeRegressor that overrides predict (for example, a Ridge that clips its predictions at 0) was predicted as its base class. (#1344)

  • Fixed an issue in ForecasterRecursive and ForecasterRecursiveMultiSeries with an XGBRegressor or an LGBMRegressor on GPU: device='cuda:0' raised a ValueError in the prediction methods, and the device of the estimator was not restored as it was after predicting (in LightGBM, 'cuda' became 'gpu'). (#1349)

  • Fixed an issue in ForecasterRecursiveClassifier with a CatBoostClassifier, where predict, predict_proba and backtesting_forecaster raised a CatBoostError about cat_features. (#1349)

  • Fixed an issue in ForecasterDirect and ForecasterDirectMultiVariate with differentiation where the predictions were wrong when steps was not consecutive from 1 (for example, steps=[3, 4, 5]). It also affected backtesting and hyperparameter search with gap > 0. (#1345)

  • predict accepted an exog whose index did not follow the frequency of the series (gaps, duplicated dates or another frequency) and used its values by position, so the predictions used the values of other dates. It now raises a ValueError that shows the first date that does not match. (#1346)

  • A last_window DataFrame with several columns was accepted by the single series forecasters, which mixed the values of its columns in the lags. It now raises a ValueError. (#1346)

  • An exog Series named as one of the exogenous variables used in training, when the forecaster was trained with more of them, raised a KeyError or was filled with NaN. The prediction methods now report the missing columns. (#1362)

  • lags, steps, levels and window_sizes given as numpy integers, numpy arrays or a pandas Index (for example, lags=np.int64(3) or levels=series.columns) raised different errors. They are now accepted, booleans are rejected, and steps=0 or an empty list raise a descriptive ValueError. (#1361, #1362, #1363)

  • Exogenous variables whose categories are nullable integers (Int32) raised a TypeError, and UInt8 or pyarrow numeric columns issued a false DataTypeWarning. (#1362)

  • Fixed an issue where fit raised AttributeError: Estimator functiontransformer does not provide get_feature_names_out when transformer_exog or transformer_y was a scikit-learn Pipeline or ColumnTransformer with a step that does not implement get_feature_names_out. (#1361)

  • The forecasters removed sample_weight (and ForecasterRnn, series_val and exog_val) from the fit_kwargs dict passed by the user, so it could not be reused. The dict is now copied. (#1362)

  • weight_func can be a functools.partial or a callable object. Before, the forecasters raised a TypeError because they read its source code. (#1353)

  • The prediction methods no longer issue a MissingValuesWarning for missing values of last_window that are not used to predict, and ForecasterRecursiveMultiSeries no longer issues the one about exog twice. (#1362, #1375)

  • RollingFeatures raised TypeError: argument of type 'NoneType' is not iterable when kwargs_stats=None. None is now the default and is replaced by {'ewm': {'alpha': 0.3}}. (#1320)

  • Fixed an issue in ForecasterRnn where predict with a last_window without one of the series used as input used another column in its place, so the predictions were wrong. It now raises a ValueError. (#1362)

  • When matplotlib, statsmodels or keras were installed but failed to import, a misleading ModuleNotFoundError hid the real error, and in Python 3.14 any failure of the keras import was reported as TensorFlow not supporting Python 3.14. The original error is now raised. (#1362)

Time zones and dates

  • Fixed two issues with time zone aware indexes in a time zone with daylight saving time (for example, Europe/Madrid) and a frequency of days or longer. When the dates generated by skforecast crossed a daylight saving change, predict, backtesting and the reshape functions raised AmbiguousTimeError or returned timestamps shifted one hour. Intraday frequencies and indexes without time zone were not affected. (#1343)

  • A date without time zone, given as steps in predict or as initial_train_size in TimeSeriesFold and OneStepAheadFold, raised TypeError: Cannot compare tz-naive and tz-aware timestamps with a time zone aware index. It is now interpreted in the time zone of the index. (#1361)

  • Fixed an issue in TimeSeriesFold and OneStepAheadFold where initial_train_size given as a date was converted into a wrong number of training observations when the index had no frequency (for example, 2 instead of 25 with an hourly index). (#1361)

Multiple series

  • Fixed an issue in ForecasterRecursiveMultiSeries with encoding='onehot' where the predictions were wrong when the series were not in alphabetical order, which includes names such as 's1' to 's10'. It affected the prediction methods and backtesting since at least version 0.19.0. (#1342)

  • Fixed an issue in ForecasterRecursiveMultiSeries where a wide exog (the same values for all the series) was used by position in the prediction methods, so an exog that did not start at the first step predicted gave wrong predictions without any error. It is now aligned by date, as in fit and backtesting. An exog whose index does not match the index of the predictions is filled with NaN: give it the index of the predictions. (#1346)

  • Fixed several issues with the exog of ForecasterRecursiveMultiSeries and ForecasterFoundation: an exog with the same length as its series but different dates is now aligned by date, an exog with the dates in descending order is no longer ignored, and a Series without name or duplicated column names raise a descriptive ValueError. (#1362, #1375)

  • ForecasterRecursiveMultiSeries accepted a dict of series with different time zones and only predicted some of them. A ValueError that lists the time zones is now raised, also in ForecasterFoundation. (#1362)

  • ForecasterRecursiveMultiSeries raised TypeError: boolean value of NA is ambiguous in fit when a series with a nullable or pyarrow dtype started or ended with missing values. (#1362)

  • set_in_sample_residuals of ForecasterRecursiveMultiSeries raised KeyError: '[...] not in index' when the series had a RangeIndex and more than 10,000 training residuals. (#1342)

  • The probabilistic prediction methods of ForecasterRecursiveMultiSeries raised ValueError: Residuals for level 'b' are None when a level that was not predicted had no residuals. (#1362)

Backtesting, hyperparameter search and feature selection

  • Fixed two issues in backtesting_forecaster and backtesting_forecaster_multiseries with refit and use_in_sample_residuals=False: the intervals could be built with the residuals of a different bin, and ForecasterDirectMultiVariate raised TypeError: 'NoneType' object is not subscriptable. (#1321)

  • Fixed two issues in the multi-series hyperparameter search with OneStepAheadFold that gave wrong metrics without any warning: when the forecaster had already been fitted with other series, and with encoding='ordinal_category' and a CatBoostRegressor when a series had no data in the test period. (#1342, #1349)

  • If the internal copy of the forecaster failed in the backtesting, hyperparameter search or feature selection functions, the forecaster passed by the user lost its fitted estimator, residuals and last window. It is no longer modified. (#1363)

  • select_features and select_features_multiseries fitted the selector with a single record when subsample=1 was an integer, and their verbose header said "Recursive feature elimination" for any selector. subsample is now always a proportion. (#1327)

  • Fixed three issues in backtesting_stats: IndexingError: Too many indexers with gap > 0, a single estimator and no interval (also in grid_search_stats and random_search_stats); an estimator_params column not aligned with estimator_id with several estimators; and a confusing NotImplementedError with an intermittent refit. (#1331)

Arima

  • Fixed an issue where the coefficients of the exogenous variables, the intercept and the drift were wrong when the model had two or more of them (for example, one exogenous variable plus the intercept). coef_ and the predictions could be far from the data. They now match statsmodels SARIMAX.

  • Fixed an issue in Arima and Ets where get_params did not return all the constructor parameters. ForecasterStats, backtesting_stats and the search functions clone the estimator, so the automatic selection settings of Arima (max_p, stepwise, ic, lambda_bc...) and lambda_param, bounds and ic of Ets were silently reset to their defaults.

  • Fixed several issues of the automatic model selection (order=None) when the selected model had a drift term: predict raised ValueError: matmul: ... with exogenous variables, backtesting_stats with freeze_params=True lost the drift, and perfectly linear series got flat forecasts.

  • Fixed the Box-Cox transformation (lambda_bc, biasadj). With a manual order it was silently ignored, and with automatic selection the fitted values and residuals were left on the transformed scale.

  • Fixed an issue in models estimated by maximum likelihood on series with missing values, where the uncertainty did not grow over the gaps. It affected coefficients, fitted values and prediction intervals. (#1335)

  • Predictions, intervals and fitted values were NaN when the estimated AR coefficients were not stationary, which could happen with enforce_stationarity=False or method='CSS'. (#1374)

  • The BIC and the AICc are now computed for models with a manual order. Before, bic_ was None and get_info_criteria('bic') returned NaN.

  • The automatic selection of the differencing orders follows R's forecast::ndiffs and forecast::nsdiffs in two cases where it could differ: series with fewer than 19 observations and series with a seasonal strength close to the threshold. (#1367, #1368)

Ets

  • Fixed the estimation of the smoothing parameters. In models without a damped trend they stayed at their starting values (alpha=0.1, beta=0.01, gamma=0.01), and the automatic model selection compared these unfitted models. Fixed parameters (alpha, beta, gamma, phi) were estimated anyway. Estimates and predictions change, and the log-likelihoods now match those of statsmodels and R's forecast::ets. (#1337)

  • Fixed the Box-Cox transformation: lambda_auto=True always selected lambda=-1 (it now uses Guerrero's method, as R), and the bias adjustment and the prediction intervals were not back-transformed correctly. (#1337)

  • The automatic model selection (model='ZZZ') ignored lambda_param and bias_adjust, and its AICc did not count the variance as a parameter, which can change the selected model for short series. (#1337, #1366)

  • The prediction intervals of models with multiplicative errors were simulated without a seed, so predict_interval returned different values on every call. They were also NaN in damped trend models with phi fixed to 1. (#1337)

  • Ets raises a ValueError when a model with multiplicative components is fitted to a series with zero or negative values, and when model is not valid (before, a KeyError). (#1337)

Other statistical models

  • acf, pacf and calculate_lag_autocorrelation with missing values inside the series: the autocorrelation now uses the same estimator as R's acf(na.action = na.pass), and the partial autocorrelation no longer returns values outside [-1, 1]. (#1370)

  • Fixed an issue in Arar where fit overwrote max_ar_depth and max_lag when they were None, so refitting on another series reused the limits of the first one. The values used are stored in max_ar_depth_ and max_lag_.

  • Fixed three errors in the prediction methods of ForecasterStats with last_window: with a single observation and a transformer_y with pandas output, and, with a Sarimax estimator, when the name of last_window or last_window_exog was not the one used in fit. (#1361, #1375)

Foundation models

  • FoundationModel now raises a ValueError when it is created with a Chronos (T5), Chronos-Bolt, Moirai 1.x or Moirai-MoE checkpoint. They were accepted but failed later, because only Chronos-2 and Moirai-2 are supported by their adapters. (#1324)

  • The supports_categorical_features tag of ForecasterFoundation was always True. It is now only True for Chronos-2. (#1324)

  • fit of FoundationModel stored exog when the model does not support exogenous variables (TimesFM 2.5 and Moirai-2). It is now ignored with an IgnoredArgumentWarning, as in ForecasterFoundation. (#1329)

Save and load

  • Fixed several issues in save_forecaster and load_forecaster with backend='skops': forecasters with a time zone aware index, a frequency below one second, a pd.DateOffset frequency or categorical exogenous variables could not be saved or loaded, and the time zone was loaded as a fixed UTC offset. Saving and loading long series is also much faster. Files saved with previous versions are still loaded. (#1352)

  • Forecasters with RollingFeatures or RollingFeaturesClassification kept a reference to their training series, so it was written to the file (16 MB instead of 6 KB with 500,000 values) and backend='skops' failed. (#1352)

  • Fixed two issues in the .py files that save_forecaster writes for the custom weight functions: they did not include the imports used by the function, so refitting the loaded forecaster raised NameError: name 'np' is not defined, and non-ASCII characters failed on Windows. (#1350, #1353)

  • save_forecaster no longer asks to save the class manually when the window_features include a RollingFeaturesClassification. (#1350)

Plotting

  • plot_prediction_distribution raised a KeyError when bootstrapping_predictions had an integer index, as returned by a forecaster trained without a datetime index. (#1359)

0.25.0 Sep 11, 2026¶

The main changes in this release are:

  • Docs New user guide about foundation forecasting with heterogeneous series: different lengths, exogenous variables and missing values. User guide

  • Feature ForecasterFoundation and FoundationModel now accept heterogeneous multi-series input: series of different lengths, a different subset of exogenous columns per series, and NaN values in the target.

  • Feature New TimesFM3Adapter adds support for Google TimesFM 3.0 ('google/timesfm-3.0-*' ids), resolved automatically from model_id. Unlike TimesFM 2.5, it accepts past-only and known-future exogenous variables and exposes device and predict_kwargs. User guide

  • Feature New LicenseWarning in the exceptions module, raised whenever a foundation model whose pre-trained weights are released under a non-commercial license (TimesFM 3.0, Moirai-2, TabPFN-TS, TS-ICL) is loaded (deduplicated to once per session by Python's default warning filter). Suppressible like any other skforecast warning (suppress_warnings=True or warnings.simplefilter).

  • API Change TimesFMAdapter renamed to TimesFM25Adapter ('google/timesfm-2.5-*' ids). The adapter is reached through FoundationModel, so user code is unaffected, but forecasters pickled by earlier versions with a TimesFMAdapter cannot be loaded.

  • API Change Removed support for percentiles in the interval argument of the predict_interval method of the Forecasters and of the backtesting functions. Deprecated since 0.23.0, interval must now be expressed as quantiles in the 0-1 range (e.g. interval=[0.05, 0.95]). Passing percentiles such as interval=[5, 95] no longer emits a FutureWarning and raises a ValueError instead.

Added

  • ForecasterFoundation and FoundationModel now accept heterogeneous multi-series input: series of different lengths, a different subset of exogenous columns per series, and NaN values in the target. Every series is forecast with its own exog columns only. For backends that require identical covariate columns in a batch (Chronos-2, TS-ICL, TabICL, TimesFM 3.0), the series are grouped by their exog columns and the backend is called once per group, so the prediction of a series never depends on the exog of the other series (Chronos-2 cross_learning applies within each group). The new read-only attributes supports_heterogeneous_covariates and supports_nan_in_series (on FoundationModel and ForecasterFoundation, together with supports_past_only_covariates) expose the backend constraints. User guide

  • New TimesFM3Adapter adds support for Google TimesFM 3.0 ('google/timesfm-3.0-*' ids), resolved automatically from model_id. Unlike TimesFM 2.5, it accepts past-only and known-future exogenous variables and exposes device and predict_kwargs. User guide

  • New LicenseWarning in the exceptions module, raised whenever a foundation model whose pre-trained weights are released under a non-commercial license (TimesFM 3.0, Moirai-2, TabPFN-TS, TS-ICL) is loaded (deduplicated to once per session by Python's default warning filter). Suppressible like any other skforecast warning (suppress_warnings=True or warnings.simplefilter).

  • ForecasterFoundation exposes the read-only attribute allow_exog (delegates to estimator.allow_exog), so the four adapter capability flags (allow_exog, supports_past_only_covariates, supports_heterogeneous_covariates, supports_nan_in_series) can be inspected on the forecaster. User guide

Changed

  • FoundationModel and ForecasterFoundation now validate the columns of the future exog against the historical exog of each series at predict time. A future column with no historical values raises a ValueError. A historical column with no future values is used as a past-only covariate by the adapters that support it (Chronos-2, TS-ICL, TimesFM 3.0) and ignored with an IgnoredArgumentWarning by the rest (TabICL, TabPFN-TS, TFC-T0, Nori). The new read-only attribute supports_past_only_covariates exposes which behavior applies.

  • TimesFMAdapter renamed to TimesFM25Adapter ('google/timesfm-2.5-*' ids). The adapter is reached through FoundationModel, so user code is unaffected, but forecasters pickled by earlier versions with a TimesFMAdapter cannot be loaded.

  • FoundationModel set_params now raises a ValueError when the new model_id is served by a different adapter than the one selected at construction (or by none). Previously the id was accepted and the failure surfaced only when the weights were loaded. Create a new FoundationModel to switch model family.

  • Removed support for percentiles in the interval argument of the predict_interval method of the Forecasters and of the backtesting functions. Deprecated since 0.23.0, interval must now be expressed as quantiles in the 0-1 range (e.g. interval=[0.05, 0.95]). Passing percentiles such as interval=[5, 95] no longer emits a FutureWarning and raises a ValueError instead.

  • Removed support for percentiles in the level argument of the predict_interval method of the statistical estimators (Arima, Arar, Ets). Deprecated since 0.23.0, level must now be expressed as coverage proportions in the (0, 1] range (e.g. level=[0.8, 0.95]). Passing percentiles such as level=[80, 95] no longer emits a FutureWarning and raises a ValueError instead.

Fixed

  • backtesting_foundation failed or produced wrongly dated predictions when a series ended before the end of the span, contained trailing NaN inside a fold, or had exogenous variables that did not cover the whole forecast horizon (KeyError in the metrics or in the Chronos-2 and TS-ICL adapters, all input arrays must have the same shape in TimesFM 3.0). The context of every series now ends at the end of the train span of the fold, so predictions always fall inside the fold's test window; a series is predicted in a fold only if it has at least one observed value in that window and its context window is not entirely NaN (a fold where no level can be predicted is skipped with a MissingValuesWarning, as in backtesting_forecaster_multiseries); and the historical and future exog are aligned to the context and to the horizon on the backtesting path as they already were in predict.

  • NoriAdapter failed with Input y contains NaN when the context contained NaN. The rows whose target or covariates are NaN are now dropped before the in-context fit.

  • backtesting_foundation silently accepted a levels argument with names that are not in series (the unknown level received a None metric, or every fold was skipped with a misleading MissingValuesWarning when none of the levels existed). It now raises a ValueError naming the unknown levels, as backtesting_forecaster_multiseries and bayesian_search_foundation already did.

  • Fixed an issue in QuantileBinner where quantile interpolation could create bins that no observation falls into, so the corresponding bin was missing from the residuals dictionary of the Forecasters. This caused a KeyError, or the use of the residuals of a different bin, in predict_interval, predict_bootstrapping and predict_quantiles when use_binned_residuals=True.

  • Fixed an issue in ForecasterRecursiveMultiSeries where predict_bootstrapping used the requested number of bins instead of the number of bins actually learned by each series binner, raising a KeyError when any of them was reduced.

  • Fixed an issue in ForecasterRecursiveMultiSeries where set_out_sample_residuals built the binned residuals of '_unknown_level' by joining the bins of the known series, although each series has its own binner. The residuals of all series are now binned with the binner of '_unknown_level', so predict_interval, predict_bootstrapping and predict_quantiles no longer raise a KeyError for unknown levels when use_in_sample_residuals=False and use_binned_residuals=True, and the residuals stored in each bin correspond to that bin.

  • Fixed an issue in crps_from_quantiles where the integration bounds were derived by scaling the extreme predicted quantiles by fixed factors (0.9 and 1.1). This made the score depend on the level of the series, return negative values for negative quantiles, under-penalize true values far outside the predicted quantiles, and return 0 when all predicted quantiles were 0. The area outside the predicted quantiles is now computed analytically, so the score is translation invariant, non-negative, grows linearly with the distance when y_true falls outside the predicted range, and reduces to the absolute error when the predictive distribution is a point mass.

0.24.0 Aug 24, 2026¶

The main changes in this release are:

  • Feature New function bayesian_search_foundation in the model_selection module to tune the inference-time configuration (e.g. context_length) of ForecasterFoundation models using optuna. User guide

  • Feature New function grid_search_equivalent_date in the model_selection module to search the best baseline configuration (offset, n_offsets, agg_func) of a ForecasterEquivalentDate using time series backtesting. User guide

  • Feature New NoriAdapter in the foundation module wrapping Synthefy Nori, registered under the 'Synthefy/Nori model_id prefix. Supports future-known exogenous variables, arbitrary quantiles in the 0-1 range, and lazy backend import. User guide (#1252)

  • Feature New TSICLAdapter in the foundation module wrapping tsicl (TSICL), registered under the 'taharnbl/TS-ICL' model_id prefix. Supports past and future known exogenous variables, a 0.01 quantile grid in [0.01, 0.99], and lazy import of the tsicl backend. Thanks to the EDF Lab team for contributing this adapter. User guide (#1265)

  • Feature New functions winkler_score and weighted_interval_score in the metrics module to evaluate the quality of prediction intervals. The Winkler score assesses a single interval (balancing sharpness and calibration), while the Weighted Interval Score (WIS) aggregates several intervals together with the median forecast and approximates the CRPS. User guide (#1254, #1262)

  • Enhancement Optimized the memory layout (order='F') of the bootstrapping prediction matrix in ForecasterRecursive, giving a notable speed-up for CatBoost estimators.

Added

Changed

  • The main branch of the repository has been renamed from master to main. All references to the default branch in CI, documentation, and test fixtures have been updated accordingly.

  • During backtesting and one-step-ahead validation of ForecasterRecursiveMultiSeries, a level is now kept whenever the estimator natively supports NaN inputs (LightGBM, XGBoost, CatBoost and scikit-learn's tree-based models: DecisionTree, ExtraTree, ExtraTrees, RandomForest and HistGradientBoosting) and no differentiation is applied. As a result, metrics may change for series with interspersed NaN values, as previously skipped levels now produce predictions. (#1196, #1260)

  • ForecasterDirectMultiVariate and ForecasterRnn build their predictors from every series, so no level can be dropped from the last window. Folds whose last window contains NaNs are now always predicted, and either return NaN predictions or raise, depending on the estimator. (#1260)

  • Optimized the memory layout (order='F') of the bootstrapping prediction matrix in ForecasterRecursive, giving a notable speed-up for CatBoost estimators. As a side effect, bootstrap prediction intervals produced by linear estimators may differ at floating-point precision (~1e-15) because BLAS summation order depends on the array memory layout.

Fixed

  • Fixed an issue where FoundationModel was not fully compatible with sklearn.base.clone. The TimesFMAdapter, TabICLAdapter, TabPFNAdapter, and NoriAdapter stored their configuration dictionaries (forecast_config_kwargs, tabicl_config, tabpfn_model_config, nori_config) as a fresh copy in __init__, which broke the parameter identity check performed by clone and raised a RuntimeError whenever a non-empty configuration dictionary was passed. Because ForecasterFoundation clones its estimator at construction, this also prevented building a forecaster from a FoundationModel configured with those settings. The configuration is now stored by reference, following the scikit-learn convention of keeping constructor parameters unchanged.

  • Fixed a misleading error raised by the predict, predict_interval, predict_bootstrapping and create_predict_X methods of ForecasterRecursiveMultiSeries when levels was an empty list and no last_window was passed. The internal length validation reported that last_window did not contain enough observations to generate the predictors, pointing at the wrong cause. A ValueError stating that no series were requested is now raised instead.

0.23.0 Jul 8, 2026¶

The main changes in this release are:

  • Feature New calendar_features parameter in all ML Forecasters (ForecasterRecursive, ForecasterRecursiveMultiSeries, ForecasterDirect, ForecasterDirectMultiVariate). Users can now pass a CalendarFeatures instance to delegate the automatic creation of calendar features (e.g. month, day of week, hour) from the datetime index to the forecaster. Calendar features are generated during both training and prediction, requiring no manual feature engineering. User guide

  • Feature New TabPFNAdapter in the foundation module for zero-shot forecasting with TabPFN-TS (Prior Labs), registered under the 'priorlabs/tabpfn' model_id prefix. The adapter supports known-future exogenous variables, arbitrary quantiles in the 0-1 range, local and cloud-API inference modes, and lazy import of the tabpfn-time-series backend. This brings the number of foundation model adapters available out of the box to five. Thanks to the Prior Labs team for contributing this adapter. User guide (#1206, #1213)

  • Feature New T0Adapter in the foundation module wrapping tfc-t0 (T0Forecaster), registered under the 'theforecastingcompany/t0' model_id prefix. Supports future-known exogenous variables, arbitrary quantiles in the 0-1 range, and lazy backend import. User guide (#1221, #1219)

  • Feature New functions acf, pacf and calculate_lag_autocorrelation in the stats module. Fast ACF and PACF implementations via FFT and Levinson-Durbin, removing the dependency on statsmodels for autocorrelation calculations. User guide

  • Enhancement Refactored the calendar feature engineering toolkit (CalendarFeatures, create_calendar_features) with new 'cyclical', 'onehot', and 'spline' encodings, fine-grained max_values overrides per feature, spline_kwargs for spline customisation, and a keep_original_columns option. ISO week 53 and leap-year day-of-year 366 are now handled in a fully stateless way. An IgnoredArgumentWarning is emitted when max_values is passed together with encoding='onehot', since onehot uses a fixed known-category set.

  • Enhancement New backend parameter in save_forecaster and load_forecaster to select the serialization engine. In addition to the default 'joblib', the 'pickle' and 'cloudpickle' backends are now supported. The 'cloudpickle' backend embeds custom functions (e.g. weight_func) and user-defined classes (e.g. window_features) directly in the saved file, removing the need to export them as separate .py files. A fourth 'skops' backend provides a secure format that does not execute arbitrary code on load, recommended when loading files from untrusted sources; the new trusted parameter of load_forecaster controls which types skops is allowed to reconstruct (False by default, the secure setting). The 'skops' backend is not available for ForecasterStats, ForecasterRnn, or ForecasterFoundation, whose underlying estimators embed objects that skops cannot serialize. On load, the backend is inferred automatically from the file extension (.joblib, .pkl/.pickle, .cloudpickle, .skops) when backend is not provided. User guide

  • API Change The interval argument of the predict_interval method of the Forecasters and of the backtesting functions is now expressed as quantiles in the 0-1 range (e.g. interval=[0.05, 0.95]) instead of percentiles in the 0-100 range. Passing percentiles is still supported but deprecated and emits a FutureWarning; support will be removed in a future version.

  • API Change The level argument of the predict_interval method of the statistical estimators (Arima, Arar, Ets) is now expressed as quantiles in the 0-1 range (e.g. level=[0.05, 0.95]) instead of percentiles in the 0-100 range. Passing percentiles is still supported but deprecated and emits a FutureWarning; support will be removed in a future version.

  • API Change select_features and select_features_multiseries now support calendar features. The select_only argument accepts the new value 'calendar' (and a list combining 'autoreg', 'exog' and 'calendar'), and both functions return a fourth element, selected_calendar_features, with the selected calendar features at the source-feature level (e.g. month). Calendar features are evaluated at the encoded-column level (e.g. month_sin, month_cos) and a source feature is kept whenever at least one of its encoded columns is selected.

  • Fix Fixed parallel execution failure in single-core environments (e.g. Docker with cpus: '1.0'). select_n_jobs_backtesting and select_n_jobs_fit_forecaster now fall back to n_jobs=1 instead of 0, which raised ValueError in joblib.Parallel. (#1197)

  • Fix Fixed TimeSeriesFold split to clamp the start of the last window to zero when window_size exceeds initial_train_size. Previously a small negative iloc start was interpreted by Python as an offset from the end of the index, producing an empty last window and a downstream TypeError. This was hit whenever a foundation model's context_length exceeded the initial train size during backtesting. (#1213)

Serialized models incompatibility

Forecasters that were serialized with previous versions of skforecast are not compatible with version 0.23.0 due to internal changes in all Forecasters (new parameters, changes in attributes, and an optimized training pipeline). Forecasters must be retrained after upgrading.

Added

  • New calendar_features parameter in all ML Forecasters (ForecasterRecursive, ForecasterRecursiveMultiSeries, ForecasterDirect, ForecasterDirectMultiVariate). Users can now pass a CalendarFeatures instance to delegate the automatic creation of calendar features (e.g. month, day of week, hour) from the datetime index to the forecaster. Calendar features are generated during both training and prediction, requiring no manual feature engineering. Only supported when the index of the input data is a pandas.DatetimeIndex. User guide

  • New TabPFNAdapter in the foundation module wrapping tabpfn-time-series (TabPFNTSPipeline), registered under the 'priorlabs/tabpfn' model_id prefix. Supports known-future exogenous variables, arbitrary quantiles in the 0-1 range, local and cloud-API inference modes, and lazy backend import. Includes a FakeTabPFNTSPipeline fixture and a full mock-based test suite mirroring the TabICL adapter tests. Contributed by the Prior Labs team. User guide (#1206, #1213)

  • New T0Adapter in the foundation module wrapping tfc-t0 (T0Forecaster), registered under the 'theforecastingcompany/t0' model_id prefix. Supports future-known exogenous variables, arbitrary quantiles in the 0-1 range, and lazy backend import. User guide (#1221, #1219)

  • New functions acf, pacf and calculate_lag_autocorrelation in the stats module. Fast ACF and PACF implementations via FFT and Levinson-Durbin, removing the dependency on statsmodels for autocorrelation calculations. User guide

  • New backend parameter in save_forecaster and load_forecaster to select the serialization engine. In addition to the default 'joblib', the 'pickle' and 'cloudpickle' backends are now supported. The 'cloudpickle' backend embeds custom functions (e.g. weight_func) and user-defined classes (e.g. window_features) directly in the saved file, removing the need to export them as separate .py files. A fourth 'skops' backend provides a secure format that does not execute arbitrary code on load, recommended when loading files from untrusted sources; the new trusted parameter of load_forecaster controls which types skops is allowed to reconstruct (False by default, the secure setting). The 'skops' backend is not available for ForecasterStats, ForecasterRnn, or ForecasterFoundation, whose underlying estimators embed objects that skops cannot serialize. On load, the backend is inferred automatically from the file extension (.joblib, .pkl/.pickle, .cloudpickle, .skops) when backend is not provided. User guide

  • Added torch 2.12 compatibility.

  • Added matplotlib 3.11 compatibility.

Changed

  • The interval argument of the predict_interval method of the Forecasters and of the backtesting functions is now expressed as quantiles in the 0-1 range (e.g. interval=[0.05, 0.95]) instead of percentiles in the 0-100 range. Passing percentiles is still supported but deprecated and emits a FutureWarning; support will be removed in a future version.

  • The level argument of the predict_interval method of the statistical estimators (Arima, Arar, Ets) is now expressed as quantiles in the 0-1 range (e.g. level=[0.05, 0.95]) instead of percentiles in the 0-100 range. Passing percentiles is still supported but deprecated and emits a FutureWarning; support will be removed in a future version.

  • Refactored the calendar feature engineering toolkit (CalendarFeatures, create_calendar_features) with new 'cyclical', 'onehot', and 'spline' encodings, fine-grained max_values overrides per feature, spline_kwargs for spline customisation, and a keep_original_columns option. ISO week 53 and leap-year day-of-year 366 are now handled in a fully stateless way. An IgnoredArgumentWarning is emitted when max_values is passed together with encoding='onehot', since onehot uses a fixed known-category set.

  • select_features and select_features_multiseries now support calendar features. The select_only argument accepts the new value 'calendar' (and a list combining 'autoreg', 'exog' and 'calendar'), and both functions return a fourth element, selected_calendar_features, with the selected calendar features at the source-feature level (e.g. month). Calendar features are evaluated at the encoded-column level (e.g. month_sin, month_cos) and a source feature is kept whenever at least one of its encoded columns is selected. A ValueError is now raised when the group(s) requested in select_only contain no features to evaluate.

  • calculate_distance_from_holiday moved from experimental to preprocessing. The function now accepts a pandas.Series or pandas.DataFrame, infers the time unit from the index frequency, renames its output columns to time_to_holiday and time_since_holiday, no longer mutates the input, requires holiday_column to be passed explicitly when X is a DataFrame, and emits a UserWarning while filling with False when the holiday column contains NaN values.

  • The verbose argument of save_forecaster now defaults to False (previously True), so saving a forecaster no longer prints its summary unless explicitly requested. load_forecaster is unchanged (verbose=True).

  • The internal preprocessing submodule was renamed from skforecast.preprocessing.preprocessing to skforecast.preprocessing._preprocessing. The public API (from skforecast.preprocessing import …) is unchanged; only direct imports from the submodule path are affected.

  • Removed the unused experimental FastOrdinalEncoder.

  • Removed seaborn as an optional dependency. The plotting functions in the plot module now rely only on matplotlib.

Fixed

  • Fixed parallel execution failure in single-core environments (e.g. Docker with cpus: '1.0'). select_n_jobs_backtesting and select_n_jobs_fit_forecaster now fall back to n_jobs=1 instead of 0, which raised ValueError in joblib.Parallel. (#1197)

  • Fixed TimeSeriesFold split to clamp the start of the last window to zero when window_size exceeds initial_train_size. Previously a small negative iloc start was interpreted by Python as an offset from the end of the index, producing an empty last window and a downstream TypeError. This was hit whenever a foundation model's context_length exceeded the initial train size during backtesting. (#1213)

  • Fix a bug in ForecasterStats where the remove_estimators method was not deleting the corresponding estimator parameters.

0.22.0 Apr 23, 2026¶

The main changes in this release are:

  • Feature New module foundation for zero-shot time series forecasting using pre-trained foundation models. The module introduces FoundationModel, a scikit-learn compatible interface, and ForecasterFoundation, a high-level forecaster fully integrated with the skforecast ecosystem (backtesting, prediction intervals via native quantiles). Four adapters are included out of the box: Chronos-2 (Amazon), TimesFM 2.5 (Google), Moirai-2 (Salesforce), and TabICLv2 (Soda-Inria). Supports single-series and multi-series forecasting, exogenous variables (Chronos-2, TabICLv2), and quantile-based prediction intervals. User guide

  • Feature New categorical_features parameter in all ML Forecasters. When set to 'auto' (default), non-numeric exogenous columns are automatically detected and encoded using an internal OrdinalEncoder. A list of column names can also be provided to explicitly specify which columns should be treated as categorical, including numeric columns. Native categorical support is configured automatically for compatible estimators (LightGBM, CatBoost, XGBoost, HistGradientBoostingRegressor). User guide

  • Feature New dropna_from_series parameter in the ForecasterRecursive, ForecasterRecursiveClassifier, ForecasterDirect and ForecasterDirectMultiVariate. When set to True, rows with NaN values generated during the construction of the training matrices are dropped before fitting. This allows training forecasters with time series that contain interspersed missing values. This parameter was already available in the ForecasterRecursiveMultiSeries. User guide

  • Enhancement Optimized the training pipeline in all Forecasters eliminating unnecessary DataFrame construction and dtype casting during fit. The public create_train_X_y method continues to return pandas objects for user inspection.

  • Enhancement Significantly reduced memory consumption and improved training speed in direct Forecasters (ForecasterDirect, ForecasterDirectMultiVariate) when using exogenous variables. Memory usage is reduced by up to 90% and fit times improve by 1.2x–3.8x in large-scale scenarios, enabling training with more steps and exogenous features without running into memory limitations.

  • API Change The regressor argument has been removed, deprecated in version 0.19.0. Use the estimator argument instead.

  • Fix Fixed conformal prediction intervals with differentiation, categorical lags in ForecasterRecursiveClassifier, and other bug fixes. See details in the "Fixed" section below.

Serialized models incompatibility

Forecasters that were serialized with previous versions of skforecast are not compatible with version 0.22.0 due to internal changes in all Forecasters (new parameters, changes in attributes, and an optimized training pipeline). Forecasters must be retrained after upgrading.

Added

  • New module foundation for zero-shot time series forecasting using pre-trained foundation models. The module introduces FoundationModel, a scikit-learn compatible interface, and ForecasterFoundation, a high-level forecaster fully integrated with the skforecast ecosystem (backtesting, prediction intervals via native quantiles). Four adapters are included out of the box: Chronos-2 (Amazon), TimesFM 2.5 (Google), Moirai-2 (Salesforce), and TabICLv2 (Soda-Inria). Supports single-series and multi-series forecasting, exogenous variables (Chronos-2, TabICLv2), and quantile-based prediction intervals. User guide

  • New categorical_features parameter in all ML Forecasters. When set to 'auto' (default), non-numeric exogenous columns are automatically detected and encoded using an internal OrdinalEncoder. A list of column names can also be provided to explicitly specify which columns should be treated as categorical, including numeric columns. Native categorical support is configured automatically for compatible estimators (LightGBM, CatBoost, XGBoost, HistGradientBoostingRegressor). User guide

  • New dropna_from_series parameter in the ForecasterRecursive, ForecasterRecursiveClassifier, ForecasterDirect and ForecasterDirectMultiVariate. When set to True, rows with NaN values generated during the construction of the training matrices are dropped before fitting. This allows training forecasters with time series that contain interspersed missing values. This parameter was already available in the ForecasterRecursiveMultiSeries. User guide

  • Binned residuals are now available in the ForecasterRnn.

Changed

  • The regressor argument has been removed, deprecated in version 0.19.0. Use the estimator argument instead.

  • Optimized the training pipeline in all Forecasters eliminating unnecessary DataFrame construction and dtype casting during fit. The public create_train_X_y method continues to return pandas objects for user inspection.

  • Significantly reduced memory consumption and improved training speed in direct Forecasters (ForecasterDirect, ForecasterDirectMultiVariate) when using exogenous variables. Memory usage is reduced by up to 90% and fit times improve by 1.2x–3.8x in large-scale scenarios, enabling training with more steps and exogenous features without running into memory limitations.

Fixed

  • Fixed an issue in conformal prediction intervals (method='conformal') where the correction factor was incorrectly scaled when using differentiation. The inverse differentiation was applied to both the point predictions and the correction factor, causing the prediction intervals to grow too fast. Affected forecasters: ForecasterRecursive, ForecasterRecursiveMultiSeries, ForecasterDirect and ForecasterDirectMultiVariate. (#1143)

  • Fixed an issue in ForecasterRecursiveClassifier where the lags were not correctly passed as categorical features when using categorical exogenous variables.

  • Fixed an issue in the hyperparameter search when using a OneStepAheadFold validation. During training, the forecaster arguments sample_weight and fit_kwargs were not set correctly.

  • Fixed an issue in backtesting_forecaster_multiseries where the tqdm progress bar completed during data preparation instead of tracking the actual fold computation, giving the false impression that backtesting had finished.

0.21.0 Mar 13, 2026¶

The main changes in this release are:

  • Feature Added AI context files (llms.txt, llms-full.txt) following the llmstxt.org spec, IDE integration for GitHub Copilot, Claude Code, Cursor, and Aider, and 12 modular workflow skills so that AI coding assistants can generate accurate, up-to-date skforecast code. User guide

  • Enhancement Optimized internal prediction loops in _recursive_predict and _recursive_predict_bootstrapping for ForecasterRecursive and ForecasterRecursiveMultiSeries. Changes include vectorized lag indexing for non-contiguous lags (~50% faster with 15-20 lags), pre-computation of loop-invariant values, and reduced redundant operations. These improvements result in faster predict methods calls, especially in scenarios with many lags and bootstrap iterations.

  • Enhancement Optimized and refactored Bayesian search functions (bayesian_search_forecaster, bayesian_search_forecaster_multiseries). Key improvements include: better default TPE sampler configuration (multivariate=True, group=True, consider_endpoints=True) for more effective hyperparameter optimization, caching of train/test splits in OneStepAheadFold to avoid redundant computation when the same lag configuration is evaluated multiple times, default n_trials increased from 10 to 20, and kwargs_create_study/kwargs_study_optimize defaults changed from {} to None. Additionally, the return_best refit summary message is now controlled by the verbose parameter across all search functions.

  • Enhancement bayesian_search_forecaster and bayesian_search_forecaster_multiseries results DataFrame now includes a trial_number column, allowing users to correlate result rows with specific optuna trials via study.trials[trial_number].

  • API Change bayesian_search_forecaster and bayesian_search_forecaster_multiseries now return the full optuna Study object as the second element of the tuple instead of best_trial. The best trial is still accessible via study.best_trial. This enables access to all optimization trials, optuna visualizations, and study resumption.

Added

  • Added machine-readable AI context files (llms.txt, llms-full.txt) following the llmstxt.org spec, automatic IDE integration (.github/copilot-instructions.md, AGENTS.md), 12 workflow skills in skills/, and a generation script (tools/ai/generate_ai_context_files.py) to keep all derived files in sync. User guide

  • Added TimeSeriesSplitter class to the experimental module. This class provides a flexible way to split time series data into training and testing sets while respecting temporal order and allowing for various configurations of train/test sizes, gaps, and strides (#1117).

Changed

  • Optimized internal prediction loops in _recursive_predict and _recursive_predict_bootstrapping for ForecasterRecursive and ForecasterRecursiveMultiSeries. Changes include vectorized lag indexing for non-contiguous lags (~50% faster with 15-20 lags), pre-computation of loop-invariant values, and reduced redundant operations. These improvements result in faster predict methods calls, especially in scenarios with many lags and bootstrap iterations.

  • Optimized and refactored Bayesian search functions (bayesian_search_forecaster, bayesian_search_forecaster_multiseries). Key improvements include: better default TPE sampler configuration (multivariate=True, group=True, consider_endpoints=True) for more effective hyperparameter optimization, caching of train/test splits in OneStepAheadFold to avoid redundant computation when the same lag configuration is evaluated multiple times, default n_trials increased from 10 to 20, and kwargs_create_study/kwargs_study_optimize defaults changed from {} to None. Additionally, the return_best refit summary message is now controlled by the verbose parameter across all search functions.

  • bayesian_search_forecaster and bayesian_search_forecaster_multiseries results DataFrame now includes a trial_number column, allowing users to correlate result rows with specific optuna trials via study.trials[trial_number].

  • bayesian_search_forecaster and bayesian_search_forecaster_multiseries now return the full optuna Study object as the second element of the tuple instead of best_trial. The best trial is still accessible via study.best_trial.

  • kwargs_read_csv has been renamed to kwargs_read in the fetch_dataset function. The new name reflects that the keyword arguments are passed to both pd.read_csv and pd.read_parquet, depending on the dataset file type.

Fixed

  • Fixed an issue where using a transformer_y or transformer_series that expands the target into multiple columns (e.g., OneHotEncoder) produced a non-descriptive internal error. Now, a clear ValueError is raised explaining that transformers applied to the target series must return a single column. (#1126)

  • Fixed an issue where out_sample_residuals_ and out_sample_residuals_by_bin_ were not reset during fit(), causing stale residuals from a previous model to silently persist after refitting. (#1123)

  • Fixed an issue in expand_index where the original RangeIndex.step was not preserved when creating future indices. Previously, step=1 was always assumed, which could lead to incorrect prediction indices. (#1150)

0.20.1 Feb 11, 2026¶

The main changes in this release are:

  • Fix Fixed an issue in backtesting functions where passing interval as a single float (e.g. interval=0.8 for 80% coverage) was not handled correctly when interval_method is set to 'bootstrapping', causing an error during prediction interval calculation.

  • Fix Fixed an issue in reshape_exog_long_to_dict where the fill_value parameter was applied to all columns, causing errors with categorical columns and silent data corruption in string columns. Now, fill_value is only applied to numeric columns, and non-numeric columns retain NaN in the gaps. A warning is issued to inform the user.

Added

Changed

Fixed

  • Fixed an issue in backtesting functions where passing interval as a single float (e.g. interval=0.8 for 80% coverage) was not handled correctly when interval_method is set to 'bootstrapping', causing an error during prediction interval calculation.

  • Fixed an issue in reshape_exog_long_to_dict where the fill_value parameter was applied to all columns, causing errors with categorical columns and silent data corruption in string columns. Now, fill_value is only applied to numeric columns, and non-numeric columns retain NaN in the gaps. A warning is issued to inform the user.

0.20.0 Feb 01, 2026¶

The main changes in this release are:

  • Enhancement Refactored the bootstrapped residuals calculation in all recursive forecasters achieving 10x speedup in the interval prediction process. This improvement significantly reduces the time required to generate prediction intervals, enhancing overall performance and user experience.

  • Feature New skforecast Arima class in the stats module. Native and fast Python implementation of ARIMA model for time series forecasting that follows the scikit-learn interface. User guide

  • Feature ForecasterStats now supports multiple estimators (Sarimax, Arima, Arar, Ets), enabling users to fit, predict, and compare several statistical models simultaneously in a unified workflow.

  • Feature Added parameter max_out_of_range_proportion to PopulationDriftDetector to set the maximum allowed proportion of out-of-range observations (for numeric features) before triggering drift detection. User guide

  • API Change ForecasterSarimax has been removed, deprecated in version 0.19.0. Use the new ForecasterStats class in the recursive module, which offers enhanced capabilities and flexibility for statistical time series forecasting.

Added

  • Support for Python 3.14.

  • New skforecast Arima class in the stats module. Native and fast Python implementation of ARIMA model for time series forecasting that follows the scikit-learn interface. User guide

  • ForecasterStats now supports multiple estimators (Sarimax, Arima, Arar, Ets), enabling users to fit, predict, and compare several statistical models simultaneously in a unified workflow.

  • New argument freeze_params in the backtesting_stats function to allow freezing the parameters of the statistical models during backtesting. When set to True, the models will use the parameters obtained from the initial fit throughout the backtesting process, rather than re-estimating them at each step.

  • Introduced vectorized _recursive_predict_bootstrapping methods in ForecasterRecursive and ForecasterRecursiveMultiSeries that predict all bootstrap samples in a single batch per step instead of looping over bootstrap iterations. This achieves significant speedup in the interval prediction process.

  • Added _transform_vectorized method to RollingFeatures for faster computation of vectorizable statistics.

  • Implemented caching in ForecasterDirect to avoid repeated computation of column indices and names during backtesting.

  • Optimized array operations in ForecasterDirectMultiVariate and ForecasterDirect to reduce memory allocations.

  • Added parameter max_out_of_range_proportion to PopulationDriftDetector to set the maximum allowed proportion of out-of-range observations (for numeric features) before triggering drift detection.

  • Introduced optimized prediction paths for linear models (using numpy dot product), LightGBM (using booster API), and XGBoost (using inplace_predict)

Changed

  • ForecasterSarimax has been removed, deprecated in version 0.19.0. Use the new ForecasterStats class in the recursive module, which offers enhanced capabilities and flexibility for statistical time series forecasting.

  • Removed residual handling from _recursive_predict methods, separating bootstrap logic into dedicated methods.

  • suppress_warnings_fit parameter in backtesting_stats function has been replaced with suppress_warnings to control the display of skforecast warnings during the entire backtesting process.

Fixed

  • Fixed an issue in QuantileBinner where duplicate bin edges caused by repeated values in the data led to non-consecutive bin indices. This caused errors in predict_bootstrapping when using binned residuals. The fix removes duplicate edges and ensures bins are always numbered consecutively from 0 to n_bins_-1. A warning is now issued when the number of bins is reduced.

0.19.1 Dec 10, 2025¶

The main changes in this release are:

  • Feature Enabled thresholds based on standard deviations in the PopulationDriftDetector class. Now, users can specify thresholds using standard deviations from the mean, allowing for more flexible and statistically grounded drift detection. This is now the default behavior when thresholds are not explicitly provided. (#1080)

  • Fix Fixed an issue that prevented using Forecasters created in past versions of the library after loading them with load_forecaster. The problem occurred with the introduction of the estimator parameter in version 0.19.0, which replaced the previous regressor parameter. This fix ensures that Forecasters saved with versions prior to 0.19.0 can be loaded and used without any issues. (#1079)

Added

  • Enabled thresholds based on standard deviations in the PopulationDriftDetector class. Now, users can specify thresholds using standard deviations from the mean, allowing for more flexible and statistically grounded drift detection. This is now the default behavior when thresholds are not explicitly provided. (#1080)

Changed

  • Include argument suppress_warnings in save_forecaster and load_forecaster functions to control the display of skforecast warnings during the save and load processes. If suppress_warnings is set to True, skforecast warnings will be suppressed. See skforecast.exceptions.warn_skforecast_categories for more information.

Fixed

  • Fixed an issue that prevented using Forecasters created in past versions of the library after loading them with load_forecaster. The problem occurred with the introduction of the estimator parameter in version 0.19.0, which replaced the previous regressor parameter. This fix ensures that Forecasters saved with versions prior to 0.19.0 can be loaded and used without any issues. (#1079)

0.19.0 Nov 28, 2025¶

The main changes in this release are:

  • API Change Parameter and attribute regressor has been deprecated in favor of estimator in all Forecasters and will be removed in future releases to align with scikit-learn terminology. Visit the migration guide section for more information.

  • Feature New class ForecasterRecursiveClassifier in the recursive module. This forecaster is designed to handle time series data where the target variable is categorical, enabling the prediction of future class labels based on historical patterns. User guide

  • Feature New class PopulationDriftDetector in the drift_detection module to detect population drift between reference and new data. Suitable to detect when forecasting models need to be retrained due to changes in the data distribution. It supports both target and exogenous variables, in single and multiseries forecasting. User guide

  • Feature New module stats. This module contains statistical models for time series forecasting that follows the scikit-learn interface. User guide

  • Feature New class Arar in the stats module. This class implements ARAR algorithm, a forecasting method that combines a "memory shortening" transformation with an autoregressive (AR) model. User guide

  • API Change Class Sarimax has been moved to the new stats module. Visit the migration guide section for more information.

  • API Change Class ForecasterSarimax has been deprecated in favor of the new ForecasterStats model in the recursive module. The new forecaster is compatible with a broader range of statistical models such as: sarimax, arima, arar and ets. Visit the migration guide section for more information.

  • Fix Fixed an issue that prevented using indices with frequencies containing metadata (e.g., CustomBusinessDay, CustomBusinessHour, or holiday/weekmask variants). The library now preserves full frequency metadata by using freq instead of freqstr, ensuring correct alignment and compatibility with custom date offsets. (#1051)

Added

  • New class ForecasterRecursiveClassifier in the recursive module. This forecaster is designed to handle time series data where the target variable is categorical, enabling the prediction of future class labels based on historical patterns.

  • New class PopulationDriftDetector in the drift_detection module to detect population drift between reference and new data. Suitable to detect when forecasting models need to be retrained due to changes in the data distribution. It supports both target and exogenous variables, in single and multiseries forecasting.

  • New module stats. This module contains statistical models for time series forecasting that follows the scikit-learn interface.

  • New class Arar in the stats module. This class implements ARAR algorithm, a forecasting method that combines a "memory shortening" transformation with an autoregressive (AR) model.

  • New function reshape_series_exog_dict_to_long in the preprocessing module to reshape series and exogenous variables from a dictionary format into a long-format pandas DataFrame with a MultiIndex. The first level of the index is the series name, and the second level is the time index.

  • Added dataset vic_electricity_classification to the datasets module. It contains hourly electricity consumption data for households in Victoria, Australia, classified into three categories: 'low', 'medium' and 'high' according to the 20th and 80th percentiles.

Changed

  • Deprecated support for Python 3.9.

  • Parameter regressor has been deprecated in favor of estimator in all Forecasters and will be removed in future releases to align with scikit-learn terminology. Visit the migration guide section for more information.

  • Class Sarimax has been moved to the new stats module. Visit the migration guide section for more information.

  • Class ForecasterSarimax has been deprecated in favor of the new ForecasterStats model in the recursive module. The new forecaster is compatible with a broader range of statistical models such as: sarimax, arima, arar and ets. Visit the migration guide section for more information.

Fixed

  • Fixed an issue that prevented using indices with frequencies containing metadata (e.g., CustomBusinessDay, CustomBusinessHour, or holiday/weekmask variants). The library now preserves full frequency metadata by using freq instead of freqstr, ensuring correct alignment and compatibility with custom date offsets. (#1051)

0.18.0 Sep 22, 2025¶

The main changes in this release are:

  • Feature New parameter fold_stride in TimeSeriesFold. This parameter controls how the start of the test set advances between consecutive folds during the backtesting_forecaster, backtesting_forecaster_multiseries and backtesting_sarimax functions. By default, fold_stride is equal to steps, which means that the test sets do not overlap and there are no gaps between them. However, if fold_stride is set to a value less than steps, the test sets will overlap, resulting in multiple forecasts for the same observations. Conversely, if fold_stride is set to a value greater than steps, gaps will be left between consecutive test sets. (#764)

  • Feature Added module drift_detection with class RangeDriftDetector to detect out-of-range values in both target and exogenous variables during prediction. This lightweight detector checks whether new observations fall outside the ranges seen during training, making it suitable for real-time and production environments. It supports both global exogenous variables and series-specific exogenous variables in multiseries forecasting.

  • Feature New function backtesting_gif_creator in the plot module to create a gif that visualizes the backtesting process.

  • Feature New function show_datasets_info to display information about all available datasets.

  • Feature New attribute __skforecast_tags__ and public method get_tags() in all forecasters which provide metadata about the forecaster, such as its capabilities and limitations. This attribute can be useful for introspection and understanding the behavior of different forecasters.

  • API Change Backtesting functions output DataFrame now includes a fold column to identify the fold number of each prediction.

  • Fix Fixed a bug that caused the gap to not be applied correctly in the backtesting_forecaster_multiseries function. (#1028)

  • Fix Fixed a bug that prevented the CatBoostRegressor from working with the ForecasterRecursiveMultiSeries. (#1039)

Added

  • New parameter fold_stride in TimeSeriesFold. This parameter controls how the start of the test set advances between consecutive folds during the backtesting_forecaster, backtesting_forecaster_multiseries and backtesting_sarimax functions. By default, fold_stride is equal to steps, which means that the test sets do not overlap and there are no gaps between them. However, if fold_stride is set to a value less than steps, the test sets will overlap, resulting in multiple forecasts for the same observations. Conversely, if fold_stride is set to a value greater than steps, gaps will be left between consecutive test sets. (#764)

  • Added module drift_detection with class RangeDriftDetector to detect out-of-range values in both target and exogenous variables during prediction. This lightweight detector checks whether new observations fall outside the ranges seen during training, making it suitable for real-time and production environments. It supports both global exogenous variables and series-specific exogenous variables in multiseries forecasting.

  • New function backtesting_gif_creator in the plot module to create a gif that visualizes the backtesting process.

  • New function show_datasets_info to display information about all available datasets.

  • New attribute __skforecast_tags__ and public method get_tags() in all forecasters which provide metadata about the forecaster, such as its capabilities and limitations. This attribute can be useful for introspection and understanding the behavior of different forecasters.

Changed

  • Backtesting functions output DataFrame now includes a fold column to identify the fold number of each prediction.

Fixed

0.17.0 Aug 11, 2025¶

The main changes in this release are:

  • Feature ForecasterEquivalentDate can now predict intervals using the conformal prediction framework.

  • Feature Created module experimental, this module contains experimental features that are not yet fully tested or may change in future releases.

  • Enhancement The ForecasterRnn and the function create_and_compile_model have been refactored to allow for the inclusion of exogenous variables. The forecaster can also make interval predictions using the conformal prediction framework.

  • API Change Input data passed to all functions/classes must have either a pandas RangeIndex or DatetimeIndex. Previously, if the input did not meet this condition, a RangeIndex starting at 0 was automatically generated. This behavior has been removed to ensure consistent and explicit handling of input data.

  • API Change ForecasterRecursiveMultiSeries now accepts three input types for the series data: a wide-format DataFrame, where each column corresponds to a different time series; a long-format DataFrame with a MultiIndex, where the first level indicates the series name and the second level is the time index; or a dictionary with series names as keys and pandas Series as values.

  • API Change ForecasterRecursiveMultiSeries now accepts exog input as a wide-format DataFrame, where each column corresponds to a different exogenous variable; a long-format DataFrame with a MultiIndex, where the first level indicates the series name to which it belongs and the second level is the time index; or a dictionary with series names as keys and pandas Series or DataFrames as values.

  • API Change The functions series_long_to_dict and exog_long_to_dict have been renamed to reshape_series_long_to_dict and reshape_exog_long_to_dict in the preprocessing module.

  • Fix A bug that prevented the use of initial_train_size as a date with the OneStepAheadFold during the hyperparameter search has been fixed.

  • Fix A bug that caused the data types to be set incorrectly when creating the predicting matrix with the create_predict_X method or when return_predictors=True in the backtesting_forecaster and backtesting_forecaster_multiseries functions has been fixed. The dtypes of the predictors are now set to match those of the training data.

  • Fix A bug that prevented the use of a pd.RangeIndex with the OneStepAheadFold during the hyperparameter search has been fixed.

Added

  • Added attribute exog_dtypes_out_ in all forecasters to store the data types of the exogenous variables used in training after the transformation applied by transformer_exog. If transformer_exog is not used, it is equal to exog_dtypes_in_.

  • Added function reshape_series_wide_to_long in the preprocessing module. This function reshapes a wide-format DataFrame where each column corresponds to a series into a long-format DataFrame with with a MultiIndex. The first level of the index is the series name and the second level is the time index.

  • Added metric symmetric_mean_absolute_percentage_error in the metrics module. This metric calculates the symmetric mean absolute percentage error (SMAPE) between the true values and the predicted values.

  • ForecasterEquivalentDate can now predict intervals using the conformal prediction framework.

  • Created module experimental, this module contains experimental features that are not yet fully tested or may change in future releases.

  • Include function calculate_distance_from_holiday in the experimental module. It calculates the number of days to the next holiday and the number of days since the last holiday in a DataFrame with a date column.

  • The ForecasterRnn and the function create_and_compile_model now support the inclusion of exogenous variables.

  • Added method predict_interval to the ForecasterRnn using the conformal prediction framework.

Changed

  • Input data passed to all functions/classes must have either a pandas RangeIndex or DatetimeIndex. Previously, if the input did not meet this condition, a RangeIndex starting at 0 was automatically generated. This behavior has been removed to ensure consistent and explicit handling of input data.

  • ForecasterRecursiveMultiSeries now accepts three input types for the series data: a wide-format DataFrame, where each column corresponds to a different time series; a long-format DataFrame with a MultiIndex, where the first level indicates the series name and the second level is the time index; or a dictionary with series names as keys and pandas Series as values.

  • ForecasterRecursiveMultiSeries now accepts exog input as a wide-format DataFrame, where each column corresponds to a different exogenous variable; a long-format DataFrame with a MultiIndex, where the first level indicates the series name to which it belongs and the second level is the time index; or a dictionary with series names as keys and pandas Series or DataFrames as values.

  • When predicting, ForecasterRecursiveMultiSeries does not require the exog input to have the same type as the one used during training.

  • Function series_long_to_dict renamed to reshape_series_long_to_dict in the preprocessing module. This function reshapes a long-format DataFrame with time series data into a dictionary format where each entry corresponds to a series.

  • Function exog_long_to_dict renamed to reshape_exog_long_to_dict in the preprocessing module. This function reshapes a long-format DataFrame with exogenous variables into a dictionary format where each entry corresponds to the exogenous variables of a series.

  • The create_and_compile_model function has been refactored. All arguments related with layers and compilation are now passed as a dictionary using the following arguments: recurrent_layers_kwargs, dense_layers_kwargs, output_dense_layer_kwargs, and compile_kwargs.

  • The arguments lags and steps were removed from the ForecasterRnn initialization. These arguments are now inferred from the estimator architecture.

  • Remove preprocess_y, preprocess_last_window and preprocess_exog in favor of check_extract_values_and_index in the utils module. This function checks if the index is a pandas DatetimeIndex or RangeIndex and extracts the values and index accordingly.

Fixed

  • A bug that prevented the use of initial_train_size as a date with the OneStepAheadFold during the hyperparameter search has been fixed.

  • A bug that caused the data types to be set incorrectly when creating the predicting matrix with the create_predict_X method or when return_predictors=True in the backtesting_forecaster and backtesting_forecaster_multiseries functions has been fixed. The dtypes of the predictors are now set to match those of the training data.

  • A bug that prevented the use of a pd.RangeIndex with the OneStepAheadFold during the hyperparameter search has been fixed.

0.16.0 May 01, 2025¶

The main changes in this release are:

  • Enhancement Refactored the internal codebase of all forecasters to enhance performance, primarily by replacing pandas DataFrames with more efficient NumPy arrays.

Added

  • Function set_cpu_gpu_device() in the utils module to set the device of the estimator to 'cpu' or 'gpu'. It is used to ensure that the recursive prediction is done in cpu even if the estimator is set to 'gpu'. This allows to avoid the bottleneck of the recursive prediction when using a gpu. Only applied to recursive forecasters when the estimator is a XGBoost, LightGBM or CatBoost model.

  • Added series_name_in_ attribute in single series forecasters to store the name of the series used to fit the forecaster.

  • Added argument return_predictors to backtesting_forecaster and backtesting_forecaster_multiseries to return the predictors generated during the backtesting process along with the predictions.

Changed

  • Refactored the internal codebase of all forecasters to enhance performance, primarily by replacing pandas DataFrames with more efficient NumPy arrays.

  • In-sample residuals in direct forecasters has been simplified.

  • The method create_predict_X in the ForecasterRecursiveMultiSeries now returns a long-format DataFrame with the predictors. The columns are level and one column for each predictor. The index is the same as the prediction index.

  • The method create_predict_X in the ForecasterDirectMultiVariate now includes the level column in the returned DataFrame. The columns are level and one column for each predictor. The index is the same as the prediction index.

Fixed

0.15.1 Mar 18, 2025¶

  • Fix Minor release to fix a bug when importing module skforecast.sarimax.

Added

Changed

Fixed

  • Fixed import error when importing the skforecast.sarimax module.

0.15.0 Mar 10, 2025¶

The main changes in this release are:

Added

  • Support for Python 3.13.

  • Added rich>=13.9.4 library as hard dependence.

  • New argument method = 'conformal' in predict_interval method or interval_method = 'conformal' in backtesting functions to use the conformal prediction framework.

  • New class ConformalIntervalCalibrator to perform conformal calibration. This class is used to calibrate the prediction intervals using the conformal prediction framework.

  • Binned residuals are now available in the ForecasterRecursiveMultiSeries, ForecasterDirect and ForecasterDirectMultiVariate forecasters.

  • New method set_in_sample_residuals to store the in-sample residuals after fitting the forecaster using the same training data.

  • Functions crps_from_predictions and crps_from_quantiles in module metrics to calculate the Continuous Ranked Probability Score (CRPS).

  • Function calculate_coverage in module metrics to calculate the coverage of the predicted intervals.

  • The differentiation argument in ForecasterRecursiveMultiSeries can now be a dict to differentiate each series independently. This is useful if the user wants to differentiate each series with a different order or not differentiate some of them.

  • Added statistic ewm (exponential weighted mean) in RollingFeatures. Alpha can be specified using the new argument kwargs_stats, default {'ewm': {'alpha': 0.3}}.

  • Added method _repr_html_ to ForecasterSarimax, TimeSeriesFold and OneStepAheadFold to display the object in HTML format.

  • Added argument consolidate_dtypes in exog_long_to_dict function to ensure that the data types of the exogenous variables are consistent across all series when np.nan values are added and integer columns are converted to float.

  • Added calculate_lag_autocorrelation function to the plot module to calculate the autocorrelation and partial autocorrelation of a time series.

  • Added datasets m5, ett_m1, ett_m2, ett_m2_extended and expenditures_australia and public_transport_madrid to the datasets module.

  • Added function create_mean_pinball_loss in the metrics module to create a function to calculate the mean pinball loss for a given quantile.

  • Added function check_one_step_ahead_input to check the input data when using a OneStepAheadFold in the model_selection functions.

  • Function set_warnings_style in the exceptions module to set the style of the skforecast warnings issued by the library.

Changed

Fixed

  • Now ForecasterRecursiveMultiSeries can be saved correctly when weight_func is a dict with None for any series. It now use the method _weight_func_all_1 to create the weight function for these series.

  • Fix transform_numpy function in the utils module to work when transformers output in scikit-learn is set_output(transform='pandas').

0.14.0 Nov 11, 2024¶

The main changes in this release are:

This release has undergone a major refactoring to improve the performance of the library. Visit the migration guide section for more information.

  • Feature Window features can be added to the training matrix using the window_features argument in all forecasters. You can use the RollingFeatures class to create these features or create your own object. Create window and custom features.

  • Feature model_selection functions now have a new argument cv. This argument expect an object of type TimeSeriesFold (backtesting) or OneStepAheadFold which allows to define the validation strategy using the arguments initial_train_size, steps, gap, refit, fixed_train_size, skip_folds and allow_incomplete_folds.

  • Feature Hyperparameter search now allows to follow a one-step-ahead validation strategy using a OneStepAheadFold as cv argument in the model_selection functions.

  • Enhancement Refactor the prediction process in ForecasterRecursiveMultiSeries to improve performance when predicting multiple series.

  • Enhancement The bootstrapping process in the predict_bootstrapping method of all forecasters has been optimized to improve performance. This may result in slightly different results when using the same seed as in previous versions.

  • Enhancement Exogenous variables can be added to the training matrix if they do not contain the first window size observations. This is useful when exogenous variables are not available in early historical data. Visit the exogenous variables section for more information.

  • API Change Package structure has been changed to improve code organization. The forecasters have been grouped into the recursive, direct amd deep_learning modules. Visit the migration guide section for more information.

  • API Change ForecasterAutoregCustom has been deprecated. Window features can be added using the window_features argument in the ForecasterRecursive.

  • API Change Refactor the set_out_sample_residuals method in all forecasters, it now expects y_true and y_pred as arguments instead of residuals. This method is used to store the residuals of the out-of-sample predictions.

  • API Change The pmdarima.ARIMA estimator is no longer supported by the ForecasterSarimax. You can use the skforecast Sarimax model or, to continue using it, use skforecast 0.13.0 or lower.

  • Fix Fixed a bug where the create_predict_X method in recursive Forecasters did not correctly generate the matrix correctly when using transformations and/or differentiations

Added

  • Added numba>=0.59 as hard dependency.

  • Added window_features argument to all forecasters. This argument allows the user to add window features to the training matrix. See RollingFeatures.

  • Hyperparameter search now allows to follow a one-step-ahead validation strategy using a OneStepAheadFold as cv argument in the model_selection functions.

  • Differentiation has been extended to all forecasters. The differentiation argument has been added to all forecasters to model the n-order differentiated time series.

  • Create transform_numpy function in the utils module to carry out the transformation of the modeled time series and exogenous variables as numpy arrays.

  • random_state argument in the fit method of ForecasterRecursive to set a seed for the random generator so that the stored sample residuals are always deterministic.

  • New private method _train_test_split_one_step_ahead in all forecasters.

  • New private function _calculate_metrics_one_step_ahead to model_selection module to calculate the metrics when predicting one step ahead.

  • The steps argument in the predict method of the ForecasterRecursive can now be a str or a pandas datetime. If so, the method will predict up to the specified date. (contribution by @imMoya #811).

  • Exogenous variables can be added to the training matrix if they do not contain the first window size observations. This is useful when exogenous variables are not available in early historical data.

  • Added support for different activation functions in the create_and_compile_model function. (contribution by @pablorodriper #824).

Changed

  • ForecasterAutoregCustom and ForecasterAutoregMultiSeriesCustom has been deprecated. Window features can be added using the window_features argument in the ForecasterRecursive and ForecasterRecursiveMultiSeries.

  • Refactor recursive_predict in ForecasterRecursiveMultiSeries to predict all series at once and include option of adding residuals. This improves performance when predicting multiple series.

  • Refactor predict_bootstrapping in all Forecasters. The bootstrapping process has been optimized to improve performance. This may result in slightly different results when using the same seed as in previous versions.

  • Change the default value of encoding to ordinal in ForecasterRecursiveMultiSeries. This will avoid conflicts if the estimator does not support categorical variables by default.

  • Removed argument engine from bayesian_search_forecaster and bayesian_search_forecaster_multiseries.

  • The pmdarima.ARIMA estimator is no longer supported by the ForecasterSarimax. You can use the skforecast Sarimax model or, to continue using it, use skforecast 0.13.0 or lower.

  • initialize_lags in utils now returns the maximum lag, max_lag.

  • Removed attribute window_size_diff from all Forecasters. The window size extended by the order of differentiation is now calculated on window_size.

  • lags can be None when initializing any Forecaster that includes window features.

  • model_selection module has been divided internally into different modules to improve code organization (_validation, _search, _split).

  • Functions from model_selection_multiseries and model_selection_sarimax modules have been moved to the model_selection module.

  • model_selection functions now have a new argument cv. This argument expect an object of type TimeSeriesFold or OneStepAheadFold which allows to define the validation strategy using the arguments initial_train_size, steps, gap, refit, fixed_train_size, skip_folds and allow_incomplete_folds.

  • Added feature_selection module. The functions select_features and select_features_multiseries have been moved to this module.

  • The functions select_features and select_features_multiseries now have 3 returns: selected_lags, selected_window_features and selected_exog.

  • Refactor the set_out_sample_residuals method in all forecasters, it now expects y_true and y_pred as arguments instead of residuals.

  • exog_to_direct and exog_to_direct_numpy in utils now returns a the names of the columns of the transformed exogenous variables.

  • Renamed attributes in all Forecasters:

    • encoding_mapping has been renamed to encoding_mapping_.

    • last_window has been renamed to last_window_.

    • index_type has been renamed to index_type_.

    • index_freq has been renamed to index_freq_.

    • training_range has been renamed to training_range_.

    • series_col_names has been renamed to series_names_in_.

    • included_exog has been renamed to exog_in_.

    • exog_type has been renamed to exog_type_in_.

    • exog_dtypes has been renamed to exog_dtypes_in_.

    • exog_col_names has been renamed to exog_names_in_.

    • series_X_train has been renamed to X_train_series_names_in_.

    • X_train_col_names has been renamed to X_train_features_names_out_.

    • binner_intervals has been renamed to binner_intervals_.

    • in_sample_residuals has been renamed to in_sample_residuals_.

    • out_sample_residuals has been renamed to out_sample_residuals_.

    • fitted has been renamed to is_fitted.

  • Renamed arguments in different functions and methods:

    • in_sample_residuals has been renamed to use_in_sample_residuals.

    • binned_residuals has been renamed to use_binned_residuals.

    • series_col_names has been renamed to series_names_in_ in the check_predict_input, check_preprocess_exog_multiseries and initialize_transformer_series functions in the utils module.

    • series_X_train has been renamed to X_train_series_names_in_ in the prepare_levels_multiseries function in the utils module.

    • exog_col_names has been renamed to exog_names_in_ in the check_predict_input and check_preprocess_exog_multiseries functions in the utils module.

    • index_type has been renamed to index_type_ in the check_predict_input function in the utils module.

    • index_freq has been renamed to index_freq_ in the check_predict_input function in the utils module.

    • included_exog has been renamed to exog_in_ in the check_predict_input function in the utils module.

    • exog_type has been renamed to exog_type_in_ in the check_predict_input function in the utils module.

    • exog_dtypes has been renamed to exog_dtypes_in_ in the check_predict_input function in the utils module.

    • fitted has been renamed to is_fitted in the check_predict_input function in the utils module.

    • use_in_sample has been renamed to use_in_sample_residuals in the prepare_residuals_multiseries function in the utils module.

    • in_sample_residuals has been renamed to use_in_sample_residuals in the backtesting_forecaster, backtesting_forecaster_multiseries and check_backtesting_input (utils module) functions.

  • binned_residuals has been renamed to use_binned_residuals in the backtesting_forecaster function.

    • in_sample_residuals has been renamed to in_sample_residuals_ in the prepare_residuals_multiseries function in the utils module.

    • out_sample_residuals has been renamed to out_sample_residuals_ in the prepare_residuals_multiseries function in the utils module.

    • last_window has been renamed to last_window_ in the preprocess_levels_self_last_window_multiseries function in the utils module.

Fixed

  • Fixed a bug where the create_predict_X method in recursive Forecasters did not correctly generate the matrix correctly when using transformations and/or differentiations.

0.13.0 Aug 01, 2024¶

The main changes in this release are:

Added

  • Support for Python 3.12.

  • keras has been added as an optional dependency, tag deeplearning, to use the ForecasterRnn.

  • PyTorch backend for the ForecasterRnn.

  • New create_predict_X method in all recursive and direct Forecasters to allow the user to inspect the matrix passed to the predict method of the estimator.

  • New _create_predict_inputs method in all Forecasters to unify the inputs of the predict methods.

  • New plot function plot_prediction_intervals in the plot module to plot predicted intervals.

  • New module metrics with functions to calculate metrics for time series forecasting such as mean_absolute_scaled_error and root_mean_squared_scaled_error.

  • New argument skip_folds in model_selection and model_selection_multiseries functions. It allows the user to skip some folds during backtesting, which can be useful to speed up the backtesting process and thus the hyperparameter search.

  • New function plot_prediction_intervals in module plot.

  • Global Forecasters ForecasterAutoregMultiSeries and ForecasterAutoregMultiSeriesCustom are able to predict series not seen during training. This is useful when the user wants to predict a new series that was not included in the training data.

  • encoding can be set to None in Global Forecasters ForecasterAutoregMultiSeries and ForecasterAutoregMultiSeriesCustom. This option does not add the encoded series ids to the estimator training matrix.

  • New argument add_aggregated_metric in backtesting_forecaster_multiseries to include, in addition to the metrics for each level, the aggregated metric of all levels using the average (arithmetic mean), weighted average (weighted by the number of predicted values of each level) or pooling (the values of all levels are pooled and then the metric is calculated).

  • New argument aggregate_metric in grid_search_forecaster_multiseries, random_search_forecaster_multiseries and bayesian_search_forecaster_multiseries to select the aggregation method used to combine the metric(s) of all levels during the hyperparameter search. The available methods are: mean (arithmetic mean), weighted (weighted by the number of predicted values of each level) and pool (the values of all levels are pooled and then the metric is calculated). If more than one metric and/or aggregation method is used, all are reported in the results, but the first of each is used to select the best model.

  • New class DateTimeFeatureTransformer and function create_datetime_features in the preprocessing module to create datetime and calendar features from a datetime index.

Changed

Fixed

0.12.1 May 20, 2024¶

Fix This is a minor release to fix a bug.

Added

Changed

Fixed

  • Bug fix when storing last_window using a [ForecasterAutoregMultiSeries] that includes differentiation.

0.12.0 May 05, 2024¶

The main changes in this release are:

Added

  • Added bayesian_search_forecaster_multiseries function to model_selection_multiseries module. This function performs a Bayesian hyperparameter search for the ForecasterAutoregMultiSeries, ForecasterAutoregMultiSeriesCustom, and ForecasterAutoregMultiVariate using optuna as the search engine.

  • ForecasterAutoregMultiVariate allows to include None when lags is a dict so that a series does not participate in the construction of X_train.

  • The output_file argument has been added to the hyperparameter search functions in the model_selection, model_selection_multiseries and model_selection_sarimax modules to save the results of the hyperparameter search in a tab-separated values (TSV) file.

  • New argument binned_residuals in method predict_interval allows to condition the bootstrapped residuals on range of the predicted values.

  • Added save_custom_functions argument to the save_forecaster function in the utils module. If True, save custom functions used in the forecaster (fun_predictors and weight_func) as .py files. Custom functions must be available in the environment where the forecaster is loaded.

  • Added select_features and select_features_multiseries functions to the model_selection and model_selection_multiseries modules to perform feature selection using scikit-learn selectors.

  • Added sort_importance argument to get_feature_importances method in all Forecasters. If True, sort the feature importances in descending order.

  • Added initialize_lags_grid function to model_selection module. This function initializes the lags to be used in the hyperparameter search functions in model_selection and model_selection_multiseries.

  • Added _initialize_levels_model_selection_multiseries function to model_selection_multiseries module. This function initializes the levels of the series to be used in the model selection functions.

  • Added set_dark_theme function to the plot module to set a dark theme for matplotlib plots.

  • Allow tuple type for lags argument in all Forecasters.

  • Argument differentiation in all Forecasters to model the n-order differentiated time series.

  • Added window_size_diff attribute to all Forecasters. It stores the size of the window (window_size) extended by the order of differentiation. Added to all Forecasters for API consistency.

  • Added store_last_window parameter to fit method in Forecasters. If True, store the last window of the training data.

  • Added utils.set_skforecast_warnings function to set the warnings of the skforecast package.

  • Added new forecaster ForecasterRnn to create forecasting models based on deep learning (RNN and LSTM).

  • Added new function create_and_compile_model to module skforecast.ForecasterRnn.utils to help to create and compile a RNN or LSTM models to be used in ForecasterRnn.

Changed

  • Deprecated argument lags_grid in bayesian_search_forecaster. Use search_space to define the candidate values for the lags. This allows the lags to be optimized along with the other hyperparameters of the estimator in the bayesian search.

  • n_boot argument in predict_intervalchanged from 500 to 250.

  • Changed the default value of the transformer_series argument to use a StandardScaler() in the Global Forecasters (ForecasterAutoregMultiSeries, ForecasterAutoregMultiSeriesCustom and ForecasterAutoregMultiVariate).

  • Refactor utils.select_n_jobs_backtesting to use the forecaster directly instead of forecaster_name and estimator_name.

  • Remove _backtesting_forecaster_verbose in model_selection in favor of _create_backtesting_folds, (deprecated since 0.8.0).

Fixed

  • Small bug in utils.select_n_jobs_backtesting, rename ForecasterAutoregMultiseries to ForecasterAutoregMultiSeries.

0.11.0 Nov 16, 2023¶

The main changes in this release are:

  • New predict_quantiles method in all Autoreg Forecasters to calculate the specified quantiles for each step.

  • Create ForecasterBaseline.ForecasterEquivalentDate, a Forecaster to create simple model that serves as a basic reference for evaluating the performance of more complex models.

Added

  • Added skforecast.datasets module. It contains functions to load data for our examples and user guides.

  • Added predict_quantiles method to all Autoreg Forecasters.

  • Added SkforecastVersionWarning to the exception module. This warning notify that the skforecast version installed in the environment differs from the version used to initialize the forecaster when using load_forecaster.

  • Create ForecasterBaseline.ForecasterEquivalentDate, a Forecaster to create simple model that serves as a basic reference for evaluating the performance of more complex models.

Changed

  • Enhance the management of internal copying in skforecast to minimize the number of copies, thereby accelerating data processing.

Fixed

  • Rename self.skforecast_version attribute to self.skforecast_version in all Forecasters.

  • Fixed a bug where the create_train_X_y method did not correctly align lags and exogenous variables when the index was not a Pandas index in all Forecasters.

0.10.1 Sep 26, 2023¶

This is a minor release to fix a bug when using grid_search_forecaster, random_search_forecaster or bayesian_search_forecaster with a Forecaster that includes differentiation.

Added

Changed

Fixed

  • Bug fix grid_search_forecaster, random_search_forecaster or bayesian_search_forecaster with a Forecaster that includes differentiation.

0.10.0 Sep 07, 2023¶

The main changes in this release are:

  • New Sarimax.Sarimax model. A wrapper of statsmodels.SARIMAX that follows the scikit-learn API and can be used with the ForecasterSarimax.

  • Added differentiation argument to ForecasterAutoreg and ForecasterAutoregCustom to model the n-order differentiated time series using the new skforecast preprocessor TimeSeriesDifferentiator.

Added

  • New Sarimax.Sarimax model. A wrapper of statsmodels.SARIMAX that follows the scikit-learn API.

  • Added skforecast.preprocessing.TimeSeriesDifferentiator to preprocess time series by differentiating or integrating them (reverse differentiation).

  • Added differentiation argument to ForecasterAutoreg and ForecasterAutoregCustom to model the n-order differentiated time series.

Changed

  • Refactor ForecasterSarimax to work with both skforecast Sarimax and pmdarima ARIMA models.

  • Replace setup.py with pyproject.toml.

Fixed

0.9.1 Jul 14, 2023¶

The main changes in this release are:

  • Fix imports in skforecast.utils module to correctly import sklearn.linear_model into the select_n_jobs_backtesting and select_n_jobs_fit_forecaster functions.

Added

Changed

Fixed

  • Fix imports in skforecast.utils module to correctly import sklearn.linear_model into the select_n_jobs_backtesting and select_n_jobs_fit_forecaster functions.

0.9.0 Jul 09, 2023¶

The main changes in this release are:

  • ForecasterAutoregDirect and ForecasterAutoregMultiVariate include the n_jobs argument in their fit method, allowing multi-process parallelization for improved performance.

  • All backtesting and grid search functions have been extended to include the n_jobs argument, allowing multi-process parallelization for improved performance.

  • Argument refit now can be also an integer in all backtesting dependent functions in modules model_selection, model_selection_multiseries, and model_selection_sarimax. This allows the Forecaster to be trained every this number of iterations.

  • ForecasterAutoregMultiSeries and ForecasterAutoregMultiSeriesCustom can be trained using series of different lengths. This means that the model can handle datasets with different numbers of data points in each series.

Added

  • Support for scikit-learn 1.3.x.

  • Argument n_jobs='auto' to fit method in ForecasterAutoregDirect and ForecasterAutoregMultiVariate to allow multi-process parallelization.

  • Argument n_jobs='auto' to all backtesting dependent functions in modules model_selection, model_selection_multiseries and model_selection_sarimax to allow multi-process parallelization.

  • Argument refit now can be also an integer in all backtesting dependent functions in modules model_selection, model_selection_multiseries, and model_selection_sarimax. This allows the Forecaster to be trained every this number of iterations.

  • ForecasterAutoregMultiSeries and ForecasterAutoregMultiSeriesCustom allow to use series of different lengths for training.

  • Added show_progress to grid search functions.

  • Added functions select_n_jobs_backtesting and select_n_jobs_fit_forecaster to utils to select the number of jobs to use during multi-process parallelization.

Changed

  • Remove get_feature_importance in favor of get_feature_importances in all Forecasters, (deprecated since 0.8.0).

  • The model_selection._create_backtesting_folds function now also returns the last window indices and whether or not to train the forecaster.

  • The model_selection functions _backtesting_forecaster_refit and _backtesting_forecaster_no_refit have been unified in _backtesting_forecaster.

  • The model_selection_multiseries functions _backtesting_forecaster_multiseries_refit and _backtesting_forecaster_multiseries_no_refit have been unified in _backtesting_forecaster_multiseries.

  • The model_selection_sarimax functions _backtesting_refit_sarimax and _backtesting_no_refit_sarimax have been unified in _backtesting_sarimax.

  • utils.preprocess_y allows a pandas DataFrame as input.

Fixed

  • Ensure reproducibility of Direct Forecasters when using predict_bootstrapping, predict_dist and predict_interval with a list of steps.

  • The create_train_X_y method returns a dict of pandas Series as y_train in ForecasterAutoregDirect and ForecasterAutoregMultiVariate. This ensures that each series has the appropriate index according to the step to be trained.

  • The filter_train_X_y_for_step method in ForecasterAutoregDirect and ForecasterAutoregMultiVariate now updates the index of X_train_step to ensure correct alignment with y_train_step.

0.8.1 May 27, 2023¶

Added

  • Argument store_in_sample_residuals=True in fit method added to all forecasters to speed up functions such as backtesting.

Changed

  • Refactor utils.exog_to_direct and utils.exog_to_direct_numpy to increase performance.

Fixed

0.8.0 May 16, 2023¶

Added

  • Added the fit_kwargs argument to all forecasters to allow the inclusion of additional keyword arguments passed to the estimator's fit method.

  • Added the set_fit_kwargs method to set the fit_kwargs attribute.

  • Support for pandas 2.0.x.

  • Added exceptions module with custom warnings.

  • Added function utils.check_exog_dtypes to issue a warning if exogenous variables are one of type init, float, or category. Raise Exception if exog has categorical columns with non integer values.

  • Added function utils.get_exog_dtypes to get the data types of the exogenous variables included during the training of the forecaster model.

  • Added function utils.cast_exog_dtypes to cast data types of the exogenous variables using a dictionary as a mapping.

  • Added function utils.check_select_fit_kwargs to check if the argument fit_kwargs is a dictionary and select only the keys used by the fit method of the estimator.

  • Added function model_selection._create_backtesting_folds to provide train/test indices (position) for backtesting functions.

  • Added argument gap to functions in model_selection, model_selection_multiseries and model_selection_sarimax to omit observations between training and prediction.

  • Added argument show_progress to functions model_selection.backtesting_forecaster, model_selection_multiseries.backtesting_forecaster_multiseries and model_selection_sarimax.backtesting_forecaster_sarimax to indicate weather to show a progress bar.

  • Added argument remove_suffix, default False, to the method filter_train_X_y_for_step() in ForecasterAutoregDirect and ForecasterAutoregMultiVariate. If remove_suffix=True the suffix "_step_i" will be removed from the column names of the training matrices.

Changed

  • Rename optional dependency package statsmodels to sarimax. Now only pmdarima will be installed, statsmodels is no longer needed.

  • Rename get_feature_importance() to get_feature_importances() in all Forecasters. get_feature_importance() method will me removed in skforecast 0.9.0.

  • Refactor get_feature_importances() in all Forecasters.

  • Remove model_selection_statsmodels in favor of ForecasterSarimax and model_selection_sarimax, (deprecated since 0.7.0).

  • Remove attributes create_predictors and source_code_create_predictors in favor of fun_predictors and source_code_fun_predictors in ForecasterAutoregCustom, (deprecated since 0.7.0).

  • The utils.check_exog function now includes a new optional parameter, allow_nan, that controls whether a warning should be issued if the input exog contains NaN values.

  • utils.check_exog is applied before and after exog transformations.

  • The utils.preprocess_y function now includes a new optional parameter, return_values, that controls whether to return a numpy ndarray with the values of y or not. This new option is intended to avoid copying data when it is not necessary.

  • The utils.preprocess_exog function now includes a new optional parameter, return_values, that controls whether to return a numpy ndarray with the values of y or not. This new option is intended to avoid copying data when it is not necessary.

  • Replaced tqdm.tqdm by tqdm.auto.tqdm.

  • Refactor utils.exog_to_direct.

Fixed

  • The dtypes of exogenous variables are maintained when generating the training matrices with the create_train_X_y method in all the Forecasters.

0.7.0 Mar 21, 2023¶

Added

  • Class ForecasterAutoregMultiSeriesCustom.

  • Class ForecasterSarimax and model_selection_sarimax (wrapper of pmdarima).

  • Method predict_interval() to ForecasterAutoregDirect and ForecasterAutoregMultiVariate.

  • Method predict_bootstrapping() to all forecasters, generate multiple forecasting predictions using a bootstrapping process.

  • Method predict_dist() to all forecasters, fit a given probability distribution for each step using a bootstrapping process.

  • Function plot_prediction_distribution in module plot.

  • Alias backtesting_forecaster_multivariate for backtesting_forecaster_multiseries in model_selection_multiseries module.

  • Alias grid_search_forecaster_multivariate for grid_search_forecaster_multiseries in model_selection_multiseries module.

  • Alias random_search_forecaster_multivariate for random_search_forecaster_multiseries in model_selection_multiseries module.

  • Attribute forecaster_id to all Forecasters.

Changed

  • Deprecated python 3.7 compatibility.

  • Added python 3.11 compatibility.

  • model_selection_statsmodels is deprecated in favor of ForecasterSarimax and model_selection_sarimax. It will be removed in version 0.8.0.

  • Remove levels_weights argument in grid_search_forecaster_multiseries and random_search_forecaster_multiseries, deprecated since version 0.6.0. Use series_weights and weights_func when creating the forecaster instead.

  • Attributes create_predictors and source_code_create_predictors renamed to fun_predictors and source_code_fun_predictors in ForecasterAutoregCustom. Old names will be removed in version 0.8.0.

  • Remove engine 'skopt' in bayesian_search_forecaster in favor of engine 'optuna'. To continue using it, use skforecast 0.6.0.

  • in_sample_residuals and out_sample_residuals are stored as numpy ndarrays instead of pandas series.

  • In ForecasterAutoregMultiSeries, set_out_sample_residuals() is now expecting a dict for the residuals argument instead of a pandas DataFrame.

  • Remove the scikit-optimize dependency.

Fixed

  • Remove operator ** in set_params() method for all forecasters.

  • Replace getfullargspec in favor of inspect.signature (contribution by @jordisilv).

0.6.0 Nov 30, 2022¶

Added

  • Class ForecasterAutoregMultivariate.

  • Function initialize_lags in utils module to create lags values in the initialization of forecasters (applies to all forecasters).

  • Function initialize_weights in utils module to check and initialize arguments series_weightsand weight_func (applies to all forecasters).

  • Argument weights_func in all Forecasters to allow weighted time series forecasting. Individual time based weights can be assigned to each value of the series during the model training.

  • Argument series_weights in ForecasterAutoregMultiSeries to define individual weights each series.

  • Include argument random_state in all Forecasters set_out_sample_residuals methods for random sampling with reproducible output.

  • In ForecasterAutoregMultiSeries, predict and predict_interval methods allow the simultaneous prediction of multiple levels.

  • backtesting_forecaster_multiseries allows backtesting multiple levels simultaneously.

  • metric argument can be a list in grid_search_forecaster_multiseries, random_search_forecaster_multiseries. If metric is a list, multiple metrics will be calculated. (suggested by Pablo Dávila Herrero https://github.com/Pablo-Davila)

  • Function multivariate_time_series_corr in module utils.

  • Function plot_multivariate_time_series_corr in module plot.

Changed

  • ForecasterAutoregDirect allows to predict specific steps.

  • Remove ForecasterAutoregMultiOutput in favor of ForecasterAutoregDirect, (deprecated since 0.5.0).

  • Rename function exog_to_multi_output to exog_to_direct in utils module.

  • In ForecasterAutoregMultiSeries, rename parameter series_levels to series_col_names.

  • In ForecasterAutoregMultiSeries change type of out_sample_residuals to a dict of numpy ndarrays.

  • In ForecasterAutoregMultiSeries, delete argument level from method set_out_sample_residuals.

  • In ForecasterAutoregMultiSeries, level argument of predict and predict_interval renamed to levels.

  • In backtesting_forecaster_multiseries, level argument of predict and predict_interval renamed to levels.

  • In check_predict_input function, argument level renamed to levels and series_levels renamed to series_col_names.

  • In backtesting_forecaster_multiseries, metrics_levels output is now a pandas DataFrame.

  • In grid_search_forecaster_multiseries and random_search_forecaster_multiseries, argument levels_weights is deprecated since version 0.6.0, and will be removed in version 0.7.0. Use series_weights and weights_func when creating the forecaster instead.

  • Refactor _create_lags_ in ForecasterAutoreg, ForecasterAutoregDirect and ForecasterAutoregMultiSeries. (suggested by Bennett https://github.com/Bennett561)

  • Refactor backtesting_forecaster and backtesting_forecaster_multiseries.

  • In ForecasterAutoregDirect, filter_train_X_y_for_step now starts at 1 (before 0).

  • In ForecasterAutoregDirect, DataFrame y_train now start with 1, y_step_1 (before y_step_0).

  • Remove cv_forecaster from module model_selection.

Fixed

  • In ForecasterAutoregMultiSeries, argument last_window predict method now works when it is a pandas DataFrame.

  • In ForecasterAutoregMultiSeries, fix bug transformers initialization.

0.5.1 Oct 05, 2022¶

Added

  • Check that exog and y have the same length in _evaluate_grid_hyperparameters and bayesian_search_forecaster to avoid fit exception when return_best.

  • Check that exog and series have the same length in _evaluate_grid_hyperparameters_multiseries to avoid fit exception when return_best.

Changed

  • Argument levels_list in grid_search_forecaster_multiseries, random_search_forecaster_multiseries and _evaluate_grid_hyperparameters_multiseries renamed to levels.

Fixed

  • ForecasterAutoregMultiOutput updated to match ForecasterAutoregDirect.

  • Fix Exception to raise when level_weights does not add up to a number close to 1.0 (before was exactly 1.0) in grid_search_forecaster_multiseries, random_search_forecaster_multiseries and _evaluate_grid_hyperparameters_multiseries.

  • Create_train_X_y in ForecasterAutoregMultiSeries now works when the forecaster is not fitted.

0.5.0 Sep 23, 2022¶

Added

  • New arguments transformer_y (transformer_series for multiseries) and transformer_exog in all forecaster classes. It is for transforming (scaling, max-min, ...) the modeled time series and exogenous variables inside the forecaster.

  • Functions in utils transform_series and transform_dataframe to carry out the transformation of the modeled time series and exogenous variables.

  • Functions _backtesting_forecaster_verbose, random_search_forecaster, _evaluate_grid_hyperparameters, bayesian_search_forecaster, _bayesian_search_optuna and _bayesian_search_skopt in model_selection.

  • Created ForecasterAutoregMultiSeries class for modeling multiple time series simultaneously.

  • Created module model_selection_multiseries. Functions: _backtesting_forecaster_multiseries_refit, _backtesting_forecaster_multiseries_no_refit, backtesting_forecaster_multiseries, grid_search_forecaster_multiseries, random_search_forecaster_multiseries and _evaluate_grid_hyperparameters_multiseries.

  • Function _check_interval in utils. (suggested by Thomas Karaouzene https://github.com/tkaraouzene)

  • metric can be a list in backtesting_forecaster, grid_search_forecaster, random_search_forecaster, backtesting_forecaster_multiseries. If metric is a list, multiple metrics will be calculated. (suggested by Pablo Dávila Herrero https://github.com/Pablo-Davila)

  • Skforecast works with python 3.10.

  • Functions save_forecaster and load_forecaster to module utils.

  • get_feature_importance() method checks if the forecast is fitted.

Changed

  • backtesting_forecaster change default value of argument fixed_train_size: bool=True.

  • Remove argument set_out_sample_residuals in function backtesting_forecaster (deprecated since 0.4.2).

  • backtesting_forecaster verbose now includes fold size.

  • grid_search_forecaster results include the name of the used metric as column name.

  • Remove get_coef method from ForecasterAutoreg, ForecasterAutoregCustom and ForecasterAutoregMultiOutput (deprecated since 0.4.3).

  • _get_metric now allows mean_squared_log_error.

  • ForecasterAutoregMultiOutput has been renamed to ForecasterAutoregDirect. ForecasterAutoregMultiOutput will be removed in version 0.6.0.

  • check_predict_input updated to check ForecasterAutoregMultiSeries inputs.

  • set_out_sample_residuals has a new argument transform to transform the residuals before being stored.

Fixed

  • fit now stores last_window values with len = forecaster.max_lag in ForecasterAutoreg and ForecasterAutoregCustom.

  • in_sample_residuals stored as a pd.Series when len(residuals) > 1000.

0.4.3 Mar 18, 2022¶

Added

  • Checks if all elements in lags are int when creating ForecasterAutoreg and ForecasterAutoregMultiOutput.

  • Add fixed_train_size: bool=False argument to backtesting_forecaster and backtesting_sarimax

Changed

  • Rename get_metric to _get_metric.

  • Functions in model_selection module allow custom metrics.

  • Functions in model_selection_statsmodels module allow custom metrics.

  • Change function set_out_sample_residuals (ForecasterAutoreg and ForecasterAutoregCustom), residuals argument must be a pandas Series (was numpy ndarray).

  • Returned value of backtesting functions (model_selection and model_selection_statsmodels) is now a float (was numpy ndarray).

  • get_coef and get_feature_importance methods unified in get_feature_importance.

Fixed

  • Requirements versions.

  • Method fit doesn't remove out_sample_residuals each time the forecaster is fitted.

  • Added random seed to residuals downsampling (ForecasterAutoreg and ForecasterAutoregCustom)

0.4.2 Jan 08, 2022¶

Added

  • Increased verbosity of function backtesting_forecaster().

  • Random state argument in backtesting_forecaster().

Changed

  • Function backtesting_forecaster() do not modify the original forecaster.

  • Deprecated argument set_out_sample_residuals in function backtesting_forecaster().

  • Function model_selection.time_series_spliter renamed to model_selection.time_series_splitter

Fixed

  • Methods get_coef and get_feature_importance of ForecasterAutoregMultiOutput class return proper feature names.

0.4.1 Dec 13, 2021¶

Added

Changed

Fixed

  • fit and predict transform pandas Series and DataFrames to numpy arrays if estimator is XGBoost.

0.4.0 Dec 10, 2021¶

Version 0.4 has undergone a huge code refactoring. Main changes are related to input-output formats (only pandas Series and DataFrames are allowed although internally numpy arrays are used for performance) and model validation methods (unified into backtesting with and without refit).

Added

  • ForecasterBase as parent class

Changed

  • Argument y must be pandas Series. Numpy ndarrays are not allowed anymore.

  • Argument exog must be pandas Series or pandas DataFrame. Numpy ndarrays are not allowed anymore.

  • Output of predict is a pandas Series with index according to the steps predicted.

  • Scikit-learn pipelines are allowed as estimators.

  • backtesting_forecaster and backtesting_forecaster_intervals have been combined in a single function.

    • It is possible to backtest forecasters already trained.
    • ForecasterAutoregMultiOutput allows incomplete folds.
    • It is possible to update out_sample_residuals with backtesting residuals.
  • cv_forecaster has the option to update out_sample_residuals with backtesting residuals.

  • backtesting_sarimax_statsmodels and cv_sarimax_statsmodels have been combined in a single function.

  • gridsearch_forecaster use backtesting as validation strategy with the option of refit.

  • Extended information when printing Forecaster object.

  • All static methods for checking and preprocessing inputs moved to module utils.

  • Remove deprecated class ForecasterCustom.

Fixed

0.3.0 Sep 01, 2021¶

Added

  • New module model_selection_statsmodels to cross-validate, backtesting and grid search AutoReg and SARIMAX models from statsmodels library:

    • backtesting_autoreg_statsmodels
    • cv_autoreg_statsmodels
    • backtesting_sarimax_statsmodels
    • cv_sarimax_statsmodels
    • grid_search_sarimax_statsmodels
  • Added attribute window_size to ForecasterAutoreg and ForecasterAutoregCustom. It is equal to max_lag.

Changed

  • cv_forecaster returns cross-validation metrics and cross-validation predictions.
  • Added an extra column for each parameter in the dataframe returned by grid_search_forecaster.
  • statsmodels 0.12.2 added to requirements

Fixed

0.2.0 Aug 26, 2021¶

Added

  • Multiple exogenous variables can be passed as pandas DataFrame.

  • Documentation at https://skforecast.org

  • New unit test

  • Increased typing

Changed

  • New implementation of ForecasterAutoregMultiOutput. The training process in the new version creates a different X_train for each step. See Direct multi-step forecasting for more details. Old version can be access with skforecast.deprecated.ForecasterAutoregMultiOutput.

Fixed

0.1.9 Jul 27, 2021¶

Added

  • Logging total number of models to fit in grid_search_forecaster.

  • Class ForecasterAutoregCustom.

  • Method create_train_X_y to facilitate access to the training data matrix created from y and exog.

Changed

  • New implementation of ForecasterAutoregMultiOutput. The training process in the new version creates a different X_train for each step. See Direct multi-step forecasting for more details. Old version can be accessed with skforecast.deprecated.ForecasterAutoregMultiOutput.

  • Class ForecasterCustom has been renamed to ForecasterAutoregCustom. However, ForecasterCustom will still remain to keep backward compatibility.

  • Argument metric in cv_forecaster, backtesting_forecaster, grid_search_forecaster and backtesting_forecaster_intervals changed from 'neg_mean_squared_error', 'neg_mean_absolute_error', 'neg_mean_absolute_percentage_error' to 'mean_squared_error', 'mean_absolute_error', 'mean_absolute_percentage_error'.

  • Check if argument metric in cv_forecaster, backtesting_forecaster, grid_search_forecaster and backtesting_forecaster_intervals is one of 'mean_squared_error', 'mean_absolute_error', 'mean_absolute_percentage_error'.

  • time_series_spliter doesn't include the remaining observations in the last complete fold but in a new one when allow_incomplete_fold=True. Take in consideration that incomplete folds with few observations could overestimate or underestimate the validation metric.

Fixed

  • Update lags of ForecasterAutoregMultiOutput after grid_search_forecaster.

0.1.8.1 May 17, 2021¶

Added

  • set_out_sample_residuals method to store or update out of sample residuals used by predict_interval.

Changed

  • backtesting_forecaster_intervals and backtesting_forecaster print number of steps per fold.

  • Only stored up to 1000 residuals.

  • Improved verbose in backtesting_forecaster_intervals.

Fixed

  • Warning of incomplete folds when using backtesting_forecast with a ForecasterAutoregMultiOutput.

  • ForecasterAutoregMultiOutput.predict allow exog data longer than needed (steps).

  • backtesting_forecast prints correctly the number of folds when remainder observations are cero.

  • Removed named argument X in self.estimator.predict(X) to allow using XGBoost estimator.

  • Values stored in self.last_window when training ForecasterAutoregMultiOutput.

0.1.8 Apr 02, 2021¶

Added

  • Class ForecasterAutoregMultiOutput.py: forecaster with direct multi-step predictions.
  • Method ForecasterCustom.predict_interval and ForecasterAutoreg.predict_interval: estimate prediction interval using bootstrapping.
  • skforecast.model_selection.backtesting_forecaster_intervals perform backtesting and return prediction intervals.

Changed

Fixed

0.1.7 Mar 19, 2021¶

Added

  • Class ForecasterCustom: same functionalities as ForecasterAutoreg but allows custom definition of predictors.

Changed

  • grid_search forecaster adapted to work with objects ForecasterCustom in addition to ForecasterAutoreg.

Fixed

0.1.6 Mar 14, 2021¶

Added

  • Method get_feature_importances to skforecast.ForecasterAutoreg.
  • Added backtesting strategy in grid_search_forecaster.
  • Added backtesting_forecast to skforecast.model_selection.

Changed

  • Method create_lags return a matrix where the order of columns match the ascending order of lags. For example, column 0 contains the values of the minimum lag used as predictor.
  • Renamed argument X to last_window in method predict.
  • Renamed ts_cv_forecaster to cv_forecaster.

Fixed

0.1.4 Feb 15, 2021¶

Added

  • Method get_coef to skforecast.ForecasterAutoreg.

Changed

Fixed