etna.analysis.plot_backtest#
- plot_backtest(forecast_df: DataFrame, ts: TSDataset, segments: List[str] | None = None, columns_num: int = 2, history_len: int | Literal['all'] = 0, figsize: Tuple[int, int] = (10, 5))[source]#
Plot targets and forecast for backtest pipeline.
This function doesn’t support intersecting folds.
- Parameters:
forecast_df (DataFrame) – forecasted dataframe with timeseries data
ts (TSDataset) – dataframe of timeseries that was used for backtest
columns_num (int) – number of subplots columns
history_len (int | Literal['all']) – length of pre-backtest history to plot, if value is “all” then plot all the history
figsize (Tuple[int, int]) – size of the figure per subplot with one segment in inches
- Raises:
ValueError: – if
history_len
is negativeValueError: – if folds are intersecting