gluonts.ext.naive_2 package#
- class gluonts.ext.naive_2.Naive2Predictor(prediction_length: int, freq: Optional[str] = None, season_length: Optional[int] = None)[source]#
Bases:
gluonts.model.predictor.RepresentablePredictorNaïve 2 forecaster as described in the M4 Competition Guide: https://www.m4.unic.ac.cy/wp-content/uploads/2018/03/M4-Competitors- Guide.pdf.
The python analogue implementation to: https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R#L118
- 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
- predict_item(item: Dict[str, Any]) gluonts.model.forecast.Forecast[source]#
- gluonts.ext.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: https://www.m4.unic.ac.cy/wp-content/uploads/2018/03/M4-Competitors-Guide.pdf Code based on: https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R