PredictionIntervalOutliersTransform¶
- class PredictionIntervalOutliersTransform(in_column: str, model: Union[Literal['prophet'], Literal['sarimax'], Type[etna.models.prophet.ProphetModel], Type[etna.models.sarimax.SARIMAXModel]], interval_width: float = 0.95, **model_kwargs)[source]¶
Bases:
etna.transforms.outliers.base.OutliersTransform
Transform that uses
get_anomalies_prediction_interval()
to find anomalies in data.Create instance of PredictionIntervalOutliersTransform.
- Parameters
in_column (str) – name of processed column
model (Union[Literal['prophet'], typing.Literal['sarimax'], typing.Type[ProphetModel], typing.Type[SARIMAXModel]]) – model for prediction interval estimation
interval_width (float) – width of the prediction interval
Notes
For not “target” column only column data will be used for learning.
- Inherited-members
- Parameters
in_column (str) –
model (Union[Literal['prophet'], typing.Literal['sarimax'], typing.Type[ProphetModel], typing.Type[SARIMAXModel]]) –
interval_width (float) –
Methods
detect_outliers
(ts)Call
get_anomalies_prediction_interval()
function with self parameters.fit
(ts)Fit the transform.
fit_transform
(ts)Fit and transform TSDataset.
get_regressors_info
()Return the list with regressors created by the transform.
inverse_transform
(ts)Inverse transform TSDataset.
load
(path)Load an object.
Get default grid for tuning hyperparameters.
save
(path)Save the object.
set_params
(**params)Return new object instance with modified parameters.
to_dict
()Collect all information about etna object in dict.
transform
(ts)Transform TSDataset inplace.
- detect_outliers(ts: etna.datasets.tsdataset.TSDataset) Dict[str, List[pandas._libs.tslibs.timestamps.Timestamp]] [source]¶
Call
get_anomalies_prediction_interval()
function with self parameters.- Parameters
ts (etna.datasets.tsdataset.TSDataset) – dataset to process
- Returns
dict of outliers in format {segment: [outliers_timestamps]}
- Return type
Dict[str, List[pandas._libs.tslibs.timestamps.Timestamp]]
- params_to_tune() Dict[str, etna.distributions.distributions.BaseDistribution] [source]¶
Get default grid for tuning hyperparameters.
This grid tunes parameters:
interval_width
,model
. Other parameters are expected to be set by the user.- Returns
Grid to tune.
- Return type
Dict[str, etna.distributions.distributions.BaseDistribution]