1. Learn
  2. /
  3. Courses
  4. /
  5. Anomaly Detection in Python

Connected

Exercise

Fitting on residuals

Another method of detecting outliers from time series is fitting a classifier to the residuals from decomposition. This is also a univariate approach with the advantage of being much faster than other multivariate methods.

The apple dataset has been loaded, along with MAD estimator and the seasonal_decompose function.

Instructions 1/3

undefined XP
    1
    2
    3
  • Extract the residuals from the DecomposeResult object and reshape the underlying array into 2D.