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: 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
-
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: 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