gluonts.ext.prophet package#

class gluonts.ext.prophet.ProphetPredictor(prediction_length: int, prophet_params: typing.Optional[typing.Dict] = None, init_model: typing.Callable = <function identity>)[source]#

Bases: gluonts.model.predictor.RepresentablePredictor

Wrapper around Prophet.

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

# you can either install Prophet directly
pip install prophet

# or install gluonts with the Prophet extras
pip install gluonts[Prophet]
Parameters
  • 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: gluonts.dataset.Dataset, 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.

Returns

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

Return type

Iterator[Forecast]