gluonts.ext.naive_2 package#
- class gluonts.ext.naive_2.Naive2Predictor(prediction_length: int, season_length: int)[source]#
Bases:
gluonts.model.predictor.RepresentablePredictor
Naïve 2 forecaster as described in the M4 Competition Guide.
See: http://www.unic.ac.cy/test/wp-content/uploads/sites/2/2018/09/M4-Competitors-Guide.pdf.
The Python analogue implementation to: https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R#L118
- Parameters
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, season_length: int) numpy.ndarray [source]#
Make seasonality adjusted time series prediction.
For details, see: http://www.unic.ac.cy/test/wp-content/uploads/sites/2/2018/09/M4-Competitors-Guide.pdf
Code based on: https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R