gluonts.model.seasonal_naive package#
- class gluonts.model.seasonal_naive.SeasonalNaivePredictor(freq: str, prediction_length: int, season_length: Optional[int] = None, imputation_method: Optional[gluonts.transform.feature.MissingValueImputation] = gluonts.transform.feature.LastValueImputation())[source]#
Bases:
gluonts.model.predictor.RepresentablePredictorSeasonal 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
freq – Frequency of the input data
prediction_length – Number of time points to predict
season_length – Length of the seasonality pattern of the input data
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]#