get_residuals¶
- get_residuals(forecast_df: pandas.core.frame.DataFrame, ts: TSDataset) TSDataset [source]¶
Get residuals for further analysis.
Function keeps hierarchy, features in result dataset and removes target components.
- Parameters
forecast_df (pandas.core.frame.DataFrame) – forecasted dataframe with timeseries data
ts (TSDataset) – dataset of timeseries that has answers to forecast
- Returns
TSDataset with residuals in forecasts
- Return type
new_ts
- Raises
KeyError: – if segments of
forecast_df
andts
aren’t the same