gluonts.model.prophet package

class gluonts.model.prophet.ProphetPredictor(freq: str, prediction_length: int, prophet_params: Optional[Dict] = None, init_model: Callable = <function ProphetPredictor.<lambda>>)[source]

Bases: gluonts.model.predictor.RepresentablePredictor

Wrapper around Prophet.

The ProphetPredictor is a thin wrapper for calling the fbprophet package. In order to use it you need to install the package:

# you can either install Prophet directly
pip install fbprophet

# or install gluonts with the Prophet extras
pip install gluonts[Prophet]
  • freq – Time frequency of the data, e.g. ‘1H’

  • prediction_length – Number of time points to predict

  • prophet_params – Parameters to pass when instantiating the prophet model.

  • init_model

    An optional function that will be called with the configured model. This can be used to configure more complex setups, e.g.

    >>> def configure_model(model):
    ...     model.add_seasonality(
    ...         name='weekly', period=7, fourier_order=3, prior_scale=0.1
    ...     )
    ...     return model

predict(dataset: Iterable[Dict[str, Any]], num_samples: int = 100, **kwargs) → Iterator[gluonts.model.forecast.SampleForecast][source]

Compute forecasts for the time series in the provided dataset. This method is not implemented in this abstract class; please use one of the subclasses. :param dataset: The dataset containing the time series to predict.


Iterator over the forecasts, in the same order as the dataset iterable was provided.

Return type