gluonts.model.seasonal_naive package#
- class gluonts.model.seasonal_naive.SeasonalNaivePredictor(prediction_length: int, season_length: int, imputation_method: gluonts.transform.feature.MissingValueImputation = gluonts.transform.feature.LastValueImputation())[source]#
Bases:
gluonts.model.predictor.RepresentablePredictor
Seasonal naïve forecaster.
For each time series \(y\), this predictor produces a forecast \(\tilde{y}(T+k) = y(T+k-h)\), where \(T\) is the forecast time, \(k = 0, ...,\) prediction_length - 1, and \(h =\) season_length.
If prediction_length > season_length, then the season is repeated multiple times. If a time series is shorter than season_length, then the mean observed value is used as prediction.
- Parameters
prediction_length – Number of time points to predict.
season_length – Seasonality used to make predictions.
imputation_method – The imputation method to use in case of missing values. Defaults to
LastValueImputation
which replaces each missing value with the last value that was not missing.
- predict_item(item: Dict[str, Any]) gluonts.model.forecast.Forecast [source]#