gluonts.model.naive_2 package

gluonts.model.naive_2.naive_2(past_ts_data: numpy.ndarray, prediction_length: int, freq: Optional[str] = None, season_length: Optional[int] = None) → numpy.ndarray[source]

Make seasonality adjusted time series prediction.

If specified, season_length takes precedence.

As described here: Code based on:

class gluonts.model.naive_2.Naive2Predictor(freq: str, prediction_length: int, season_length: Optional[int] = None)[source]

Bases: gluonts.model.predictor.RepresentablePredictor

Naïve 2 forecaster as described in the M4 Competition Guide:

The python analogue implementation to:

  • 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

predict_item(item: Dict[str, Any]) → gluonts.model.forecast.Forecast[source]