gluonts.model.trivial.constant module#
- class gluonts.model.trivial.constant.ConstantPredictor(samples: ndarray)[source]#
Bases:
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]) SampleForecast [source]#
- class gluonts.model.trivial.constant.ConstantValuePredictor(prediction_length: int, value: float = 0.0, num_samples: int = 1)[source]#
Bases:
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]) SampleForecast [source]#