Table Of Contents
Table Of Contents

gluonts.model.trivial.constant module

class gluonts.model.trivial.constant.ConstantPredictor(samples: numpy.ndarray, freq: str)[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.
  • freq – Frequency of the predicted data.
predict_item(item: Dict[str, Any]) → gluonts.model.forecast.SampleForecast[source]
class gluonts.model.trivial.constant.ConstantValuePredictor(prediction_length: int, freq: str, value: float = 0.0, num_eval_samples: int = 1)[source]

Bases: gluonts.model.predictor.RepresentablePredictor, gluonts.model.predictor.FallbackPredictor

A Predictor that always produces the same value as forecast.

Parameters:
  • value – The value to use as forecast.
  • prediction_length – Prediction horizon.
  • freq – Frequency of the predicted data.
predict_item(item: Dict[str, Any]) → gluonts.model.forecast.SampleForecast[source]