etna.analysis.get_residuals#

get_residuals(forecast_df: DataFrame, ts: TSDataset) TSDataset[source]#

Get residuals for further analysis.

Function keeps hierarchy, features in result dataset and removes target components.

Parameters:
  • forecast_df (DataFrame) – forecasted dataframe with timeseries data

  • ts (TSDataset) – dataset of timeseries that has answers to forecast

Returns:

TSDataset with residuals in forecasts

Raises:

KeyError: – if segments of forecast_df and ts aren’t the same

Return type:

TSDataset