prediction_interval_outliers¶
Functions
|
Create TSDataset with certain segments. |
|
Create TSDataset based on original ts with selecting only column in each segment and setting it to target. |
|
Get point outliers in time series using prediction intervals (estimation model-based method). |
- create_ts_by_column(ts: etna.datasets.tsdataset.TSDataset, column: str) etna.datasets.tsdataset.TSDataset [source]¶
Create TSDataset based on original ts with selecting only column in each segment and setting it to target.
- Parameters
ts (etna.datasets.tsdataset.TSDataset) – dataset with timeseries data
column (str) – column to select in each.
- Returns
result – dataset with selected column.
- Return type
- get_anomalies_prediction_interval(ts: etna.datasets.tsdataset.TSDataset, model: Union[Type[ProphetModel], Type[SARIMAXModel]], interval_width: float = 0.95, in_column: str = 'target', **model_params) Dict[str, List[pandas._libs.tslibs.timestamps.Timestamp]] [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 (etna.datasets.tsdataset.TSDataset) – dataset with timeseries data(should contains all the necessary features).
model (Union[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.
- Returns
dict of outliers in format {segment: [outliers_timestamps]}.
- Return type
Dict[str, List[pandas._libs.tslibs.timestamps.Timestamp]]
Notes
For not “target” column only column data will be used for learning.