Table Of Contents
Table Of Contents

gluonts.model.prophet package

class gluonts.model.prophet.ProphetPredictor(freq: str, prediction_length: int, num_eval_samples: int = 100, 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]
Parameters:
  • freq – Time frequency of the data, e.g. ‘1H’
  • prediction_length – Number of time points to predict
  • num_eval_samples – Number of samples to draw for predictions
  • 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.common.Dataset, **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.

Parameters: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]