mean_var_anomaly_score#

mean_var_anomaly_score(precomputed_params: ndarray, interval_starts: ndarray, interval_ends: ndarray, anomaly_starts: ndarray, anomaly_ends: ndarray) ndarray[source]#

Calculate the score for an anomaly in the mean and/or variance.

Computes the likelihood ratio test for a change in the mean and/or variance of i.i.d. Gaussian data between the anomaly interval and its complement within the overall interval.

The overall and anomalous intervals must satisfy interval_start > anomaly_start <= anomaly_end <= interval_end.

Parameters:
precomputed_paramsnp.ndarray

Precomputed parameters from init_mean_var_score.

interval_startsnp.ndarray

Start indices of the intervals to test for an anomaly in.

interval_endsnp.ndarray

End indices of the intervals to test for an anomaly in.

anomaly_startsnp.ndarray

Start indices of the anomalies.

anomaly_endsnp.ndarray

End indices of the anomalies.

Returns:
scorefloat

Score for an anomaly in the mean and/or variance.

Notes

To optimize performance, no checks are performed on the inputs.