plot_forecast

plot_forecast(forecast_ts: Union[TSDataset, List[TSDataset], Dict[str, TSDataset]], test_ts: Optional[TSDataset] = None, train_ts: Optional[TSDataset] = None, segments: Optional[List[str]] = None, n_train_samples: Optional[int] = None, columns_num: int = 2, figsize: Tuple[int, int] = (10, 5), prediction_intervals: bool = False, quantiles: Optional[List[float]] = None)[source]

Plot of prediction for forecast pipeline.

Parameters
  • forecast_ts (Union[TSDataset, List[TSDataset], Dict[str, TSDataset]]) –

    there are several options:

    1. Forecasted TSDataset with timeseries data, single-forecast mode

    2. List of forecasted TSDatasets, multi-forecast mode

    3. Dictionary with forecasted TSDatasets, multi-forecast mode

  • test_ts (Optional[TSDataset]) – TSDataset with timeseries data

  • train_ts (Optional[TSDataset]) – TSDataset with timeseries data

  • segments (Optional[List[str]]) – segments to plot; if not given plot all the segments from forecast_df

  • n_train_samples (Optional[int]) – length of history of train to plot

  • columns_num (int) – number of graphics columns

  • figsize (Tuple[int, int]) – size of the figure per subplot with one segment in inches

  • prediction_intervals (bool) – if True prediction intervals will be drawn

  • quantiles (Optional[List[float]]) – List of quantiles to draw, if isn’t set then quantiles from a given dataset will be used. In multi-forecast mode, only quantiles present in each forecast will be used.

Raises

ValueError: – if the format of forecast_ts is unknown