sktime.forecasting: Time series forecasting¶
The sktime.forecasting
module contains algorithms and composition tools for forecasting.
Base¶
|
Forecasting horizon |
Naive¶
|
NaiveForecaster is a forecaster that makes forecasts using simple strategies. |
Trend¶
|
Forecast time series data with a polynomial trend. |
Exponential Smoothing¶
|
Holt-Winters exponential smoothing forecaster. |
|
ETS models with both manual and automatic fitting capabilities. |
ARIMA¶
|
Automatically discover the optimal order for an ARIMA model. |
|
An ARIMA estimator. |
Theta¶
|
Theta method of forecasting. |
BATS/TBATS¶
|
BATS estimator used to fit and select best performing model. |
|
TBATS estimator used to fit and select best performing model. |
Prophet¶
|
Prophet forecaster by wrapping fbprophet. :param freq: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html #timeseries-offset-aliases :type freq: String of DatetimeIndex frequency. See here for possible values: :param add_seasonality: Dict can have the following keys/values: name: string name of the seasonality component. period: float number of days in one period. fourier_order: int number of Fourier components to use. prior_scale: optional float prior scale for this component. mode: optional ‘additive’ or ‘multiplicative’ condition_name: string name of the seasonality condition. :type add_seasonality: Dict with args for Prophet.add_seasonality(). :param add_country_holidays: Dict can have the following keys/values: country_name: Name of the country, like ‘UnitedStates’ or ‘US’ :type add_country_holidays: Dict with args for Prophet.add_country_holidays(). :param growth: trend. :type growth: String ‘linear’ or ‘logistic’ to specify a linear or logistic :param changepoints: not specified, potential changepoints are selected automatically. :type changepoints: List of dates at which to include potential changepoints. If :param n_changepoints: if input changepoints is supplied. If changepoints is not supplied, then n_changepoints potential changepoints are selected uniformly from the first changepoint_range proportion of the history. :type n_changepoints: Number of potential changepoints to include. Not used :param changepoint_range: be estimated. Defaults to 0.8 for the first 80%. Not used if changepoints is specified. :type changepoint_range: Proportion of history in which trend changepoints will :param yearly_seasonality: Can be ‘auto’, True, False, or a number of Fourier terms to generate. :type yearly_seasonality: Fit yearly seasonality. :param weekly_seasonality: Can be ‘auto’, True, False, or a number of Fourier terms to generate. :type weekly_seasonality: Fit weekly seasonality. :param daily_seasonality: Can be ‘auto’, True, False, or a number of Fourier terms to generate. :type daily_seasonality: Fit daily seasonality. :param holidays: and optionally columns lower_window and upper_window which specify a range of days around the date to be included as holidays. lower_window=-2 will include 2 days prior to the date as holidays. Also optionally can have a column prior_scale specifying the prior scale for that holiday. :type holidays: pd.DataFrame with columns holiday (string) and ds (date type) :param seasonality_mode: :type seasonality_mode: ‘additive’ (default) or ‘multiplicative’. :param seasonality_prior_scale: seasonality model. Larger values allow the model to fit larger seasonal fluctuations, smaller values dampen the seasonality. Can be specified for individual seasonalities using add_seasonality. :type seasonality_prior_scale: Parameter modulating the strength of the :param holidays_prior_scale: components model, unless overridden in the holidays input. :type holidays_prior_scale: Parameter modulating the strength of the holiday :param changepoint_prior_scale: automatic changepoint selection. Large values will allow many changepoints, small values will allow few changepoints. :type changepoint_prior_scale: Parameter modulating the flexibility of the :param mcmc_samples: with the specified number of MCMC samples. If 0, will do MAP estimation. :type mcmc_samples: Integer, if greater than 0, will do full Bayesian inference :param alpha: for the forecast. If mcmc_samples=0, this will be only the uncertainty in the trend using the MAP estimate of the extrapolated generative model. If mcmc.samples>0, this will be integrated over all model parameters, which will include uncertainty in seasonality. :type alpha: Float, width of the uncertainty intervals provided :param uncertainty_samples: uncertainty intervals. Settings this value to 0 or False will disable uncertainty estimation and speed up the calculation. :type uncertainty_samples: Number of simulated draws used to estimate :param stan_backend: iterate over all available backends and find the working one :type stan_backend: str as defined in StanBackendEnum default: None - will try to. |
Composition¶
|
Ensemble of forecasters |
|
Meta-estimator for forecasting transformed time series. |
|
Forecasting based on reduction to tabular regression with a direct reduction strategy. |
|
Forecasting based on reduction to time series regression with a direct reduction strategy. |
|
Forecasting based on reduction to tabular regression with a multioutput reduction strategy. |
|
Forecasting based on reduction to tabular regression with a recursive reduction strategy. |
Forecasting based on reduction to time series regression with a recursive reduction strategy. |
|
|
Forecasting based on reduction |
|
Online Forecasting¶
|
Online Updating Ensemble of forecasters |
|
Implementation of A Parameter-free Hedging Algorithm, Kamalika Chaudhuri, Yoav Freund, Daniel Hsu (2009) as a hedge-style algorithm. |
|
Ensemble class that performs a non-negative least squares to fit to the estimators. |
Model Selection¶
|
Manual window splitter to split time series at given cutoff points. |
|
Single window splitter |
|
Sliding window splitter |
|
Performs grid-search cross-validation to find optimal model parameters. |
|
Performs randomized-search cross-validation to find optimal model parameters. |
|
Split arrays or matrices into sequential train and test subsets Creates train/test splits over endogenous arrays an optional exogenous arrays. |