gluonts.ext.naive_2 包#
- class gluonts.ext.naive_2.Naive2Predictor(prediction_length: int, season_length: int)[source]#
基类:
gluonts.model.predictor.RepresentablePredictor
M4 竞赛指南中描述的 Naïve 2 预测器。
参见:http://www.unic.ac.cy/test/wp-content/uploads/sites/2/2018/09/M4-Competitors-Guide.pdf。
Python 中的对应实现,参考:https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R#L118
- 参数
prediction_length – 要预测的时间点数量
season_length – 输入数据的季节性模式长度
- 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]#
进行季节性调整的时间序列预测。
详情请参见:http://www.unic.ac.cy/test/wp-content/uploads/sites/2/2018/09/M4-Competitors-Guide.pdf
代码基于:https://github.com/Mcompetitions/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R