etna.analysis.get_anomalies_hist#

get_anomalies_hist(ts: TSDataset, in_column: str = 'target', bins_number: int = 10, index_only: bool = True) Dict[str, List[Timestamp] | List[int] | Series][source]#

Get point outliers in time series using histogram model.

Outliers are all points that, when removed, result in a histogram with a lower approximation error, even with the number of bins less than the number of outliers.

Parameters:
  • ts (TSDataset) – TSDataset with timeseries data

  • in_column (str) – name of the column in which the anomaly is searching

  • bins_number (int) – number of bins

  • 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]