etna.analysis.get_anomalies_prediction_interval#

get_anomalies_prediction_interval(ts: TSDataset, model: Type[ProphetModel] | Type[SARIMAXModel], interval_width: float = 0.95, in_column: str = 'target', index_only: bool = True, **model_params) Dict[str, List[Timestamp] | List[int] | Series][source]#

Get point outliers in time series using prediction intervals (estimation model-based method).

Outliers are all points out of the prediction interval predicted with the model.

Parameters:
  • ts (TSDataset) – dataset with timeseries data(should contains all the necessary features).

  • model (Type[ProphetModel] | Type[SARIMAXModel]) – model for prediction interval estimation.

  • interval_width (float) – the significance level for the prediction interval. By default a 95% prediction interval is taken.

  • in_column (str) –

    column to analyze

    • If it is set to “target”, then all data will be used for prediction.

    • Otherwise, only column data will be used.

  • index_only (bool) – whether to return only outliers indices. If False will return outliers series

Returns:

dict of outliers in format {segment: [outliers_timestamps]}.

Return type:

Dict[str, List[Timestamp] | List[int] | Series]

Notes

For not “target” column only column data will be used for learning.