gluonts.model.trivial.constant module#
- class gluonts.model.trivial.constant.ConstantPredictor(samples: numpy.ndarray)[source]#
Bases:
gluonts.model.predictor.RepresentablePredictor
A Predictor that always produces the same forecast.
- Parameters
samples – Samples to use to construct SampleForecast objects for every prediction.
- predict_item(item: Dict[str, Any]) gluonts.model.forecast.SampleForecast [source]#
- class gluonts.model.trivial.constant.ConstantValuePredictor(prediction_length: int, value: float = 0.0, num_samples: int = 1)[source]#
Bases:
gluonts.model.predictor.RepresentablePredictor
A Predictor that always produces the same value as forecast.
- Parameters
value – The value to use as forecast.
prediction_length – Prediction horizon.
- predict_item(item: Dict[str, Any]) gluonts.model.forecast.SampleForecast [source]#