mlnext.anomaly#

Module for analyzing anomalies.

Functions

apply_point_adjust

Implements the point-adjust approach from https://arxiv.org/abs/1802.03903 and its variation from https://arxiv.org/abs/2109.05257 (parameter k).

apply_point_adjust_score

Implements the point-adjust approach from https://arxiv.org/pdf/1802.03903.pdf and its variation from https://arxiv.org/abs/2109.05257 (parameter k) for prediction scores.

find_anomalies

Finds continuous segments of anomalies and returns a list of tuple with the start end end index of each anomaly.

rank_features

Finds the anomalies in y and calculates the feature-wise error for each anomaly.

recall_anomalies

Calculates the percentage of anomaly segments that are correctly detected.