etna.analysis.plot_forecast#
- plot_forecast(forecast_ts: TSDataset | List[TSDataset] | Dict[str, TSDataset], test_ts: TSDataset | None = None, train_ts: TSDataset | None = None, segments: List[str] | None = None, n_train_samples: int | None = None, columns_num: int = 2, figsize: Tuple[int, int] = (10, 5), prediction_intervals: bool = False, quantiles: List[float] | None = None)[source]#
- Plot of prediction for forecast pipeline. - Parameters:
- forecast_ts (TSDataset | List[TSDataset] | Dict[str, TSDataset]) – - there are several options: - Forecasted TSDataset with timeseries data, single-forecast mode 
- List of forecasted TSDatasets, multi-forecast mode 
- Dictionary with forecasted TSDatasets, multi-forecast mode 
 
- test_ts (TSDataset | None) – TSDataset with timeseries data 
- train_ts (TSDataset | None) – TSDataset with timeseries data 
- segments (List[str] | None) – segments to plot; if not given plot all the segments from - forecast_df
- n_train_samples (int | None) – 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 (List[float] | None) – 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_tsis unknown
- ValueError: – if there is an intersection between non-equal borders 
- ValueError: – if provided quantiles are not in the datasets