sktime.forecasting.compose¶
-
class
sktime.forecasting.compose.
DirectRegressionForecaster
(regressor, window_length=10, step_length=1)[source]¶ Bases:
sktime.forecasting.compose._reduce.ReducedTabularRegressorMixin
,sktime.forecasting.compose._reduce._DirectReducer
Forecasting based on reduction to tabular regression with a direct reduction strategy. For the direct reduction strategy, a separate forecaster is fitted for each step ahead of the forecasting horizon
- Parameters
regressor (sklearn estimator object) – Define the regression model type.
window_length (int, optional (default=10)) – The length of the sliding window used to transform the series into a tabular matrix
step_length (int, optional (default=1)) – The number of time steps taken at each step of the sliding window used to transform the series into a tabular matrix.
-
class
sktime.forecasting.compose.
DirectTimeSeriesRegressionForecaster
(regressor, window_length=10, step_length=1)[source]¶ Bases:
sktime.forecasting.compose._reduce.ReducedTimeSeriesRegressorMixin
,sktime.forecasting.compose._reduce._DirectReducer
Forecasting based on reduction to time series regression with a direct reduction strategy. For the direct reduction strategy, a separate forecaster is fitted for each step ahead of the forecasting horizon
- Parameters
regressor (sktime estimator object) – Define the type of time series regression model.
window_length (int, optional (default=10)) – The length of the sliding window used to transform the series into a tabular matrix
step_length (int, optional (default=1)) – The number of time steps taken at each step of the sliding window used to transform the series into a tabular matrix.
-
class
sktime.forecasting.compose.
EnsembleForecaster
(forecasters, n_jobs=None)[source]¶ Bases:
sktime.forecasting.base._sktime._OptionalForecastingHorizonMixin
,sktime.forecasting.base._meta._HeterogenousEnsembleForecaster
Ensemble of forecasters
- Parameters
-
class
sktime.forecasting.compose.
MultioutputRegressionForecaster
(regressor, window_length=10, step_length=1)[source]¶ Bases:
sktime.forecasting.compose._reduce.ReducedTabularRegressorMixin
,sktime.forecasting.compose._reduce._MultioutputReducer
Forecasting based on reduction to tabular regression with a multioutput reduction strategy. For the multioutput reduction strategy, a single forecaster is fitted simultaneously to all the future steps in the forecasting horizon
- Parameters
regressor (sklearn estimator object) – Define the regression model type.
window_length (int, optional (default=10)) – The length of the sliding window used to transform the series into a tabular matrix
step_length (int, optional (default=1)) – The number of time steps taken at each step of the sliding window used to transform the series into a tabular matrix.
-
class
sktime.forecasting.compose.
RecursiveRegressionForecaster
(regressor, window_length=10, step_length=1)[source]¶ Bases:
sktime.forecasting.compose._reduce.ReducedTabularRegressorMixin
,sktime.forecasting.compose._reduce._RecursiveReducer
Forecasting based on reduction to tabular regression with a recursive reduction strategy. For the recursive reduction strategy, a single estimator is fit for a one-step-ahead forecasting horizon and then called iteratively to predict multiple steps ahead.
- Parameters
regressor (sklearn estimator object) – Define the regression model type.
window_length (int, optional (default=10)) – The length of the sliding window used to transform the series into a tabular matrix
step_length (int, optional (default=1)) – The number of time steps taken at each step of the sliding window used to transform the series into a tabular matrix.
-
class
sktime.forecasting.compose.
RecursiveTimeSeriesRegressionForecaster
(regressor, window_length=10, step_length=1)[source]¶ Bases:
sktime.forecasting.compose._reduce.ReducedTimeSeriesRegressorMixin
,sktime.forecasting.compose._reduce._RecursiveReducer
Forecasting based on reduction to time series regression with a recursive reduction strategy. For the recursive reduction strategy, a single estimator is fit for a one-step-ahead forecasting horizon and then called iteratively to predict multiple steps ahead.
- Parameters
regressor (sktime estimator object) – Define the type of time series regression model.
window_length (int, optional (default=10)) – The length of the sliding window used to transform the series into a tabular matrix
step_length (int, optional (default=1)) – The number of time steps taken at each step of the sliding window used to transform the series into a tabular matrix.
-
sktime.forecasting.compose.
ReducedForecaster
(regressor, scitype, strategy='recursive', window_length=10, step_length=1)[source]¶ Forecasting based on reduction
When fitting, a rolling window approach is used to first transform the target series into panel data which is then used to train a regressor. During prediction, the last available data is used as input to the fitted regressors to make forecasts.
- Parameters
References
..[1] Bontempi, Gianluca & Ben Taieb, Souhaib & Le Borgne, Yann-Aël. ( 2013).
Machine Learning Strategies for Time Series Forecasting.
-
class
sktime.forecasting.compose.
StackingForecaster
(forecasters, final_regressor, n_jobs=None)[source]¶ Bases:
sktime.forecasting.base._sktime._RequiredForecastingHorizonMixin
,sktime.forecasting.base._meta._HeterogenousEnsembleForecaster
-
class
sktime.forecasting.compose.
TransformedTargetForecaster
(steps)[source]¶ Bases:
sktime.forecasting.base._sktime._OptionalForecastingHorizonMixin
,sktime.forecasting.base._sktime._SktimeForecaster
,sktime.base._meta._HeterogenousMetaEstimator
,sktime.transformations.base._SeriesToSeriesTransformer
Meta-estimator for forecasting transformed time series.
-
fit
(y, X=None, fh=None)[source]¶ Fit to training data.
- Parameters
- Returns
self
- Return type
returns an instance of self.
-
get_params
(deep=True)[source]¶ Get parameters for this estimator. :param deep: If True, will return the parameters for this estimator and
contained subobjects that are estimators.
- Returns
params – Parameter names mapped to their values.
- Return type
mapping of string to any
-