Orion
path: orion.primitives.timeseries_anomalies.find_anomalies
orion.primitives.timeseries_anomalies.find_anomalies
description: this primitive extracts anomalies from sequences of errors following the approach explained in the related paper.
see json.
argument
type
description
parameters
errors
numpy.ndarray
array of errors
index
array of indices of errors
hyperparameters
z_range
tuple
list of two values denoting the range out of which the start points for the scipy.fmin function are chosen
scipy.fmin
window_size
int
size of the window for which a threshold is calculated
window_step_size
number of steps the window is moved before another threshold is calculated for the new window
lower_threshold
bool
indicates whether to apply a lower threshold to find unusually low errors
fixes_threshold
indicates whether to use fixed or dynamic thresholding
min_percent
float
percentage of separation the anomalies need to meet between themselves and the highest non-anomalous error in the window sequence
anomaly_padding
number of errors before and after a found anomaly that are added to the anomalous sequence
output
y
array containing start-index, end-index, score for each anomalous sequence that was found
In [1]: import numpy as np In [2]: from mlstars import load_primitive In [3]: primitive = load_primitive('orion.primitives.timeseries_anomalies.find_anomalies', ...: arguments={"anomaly_padding": 1}) ...: In [4]: errors = np.array([0.01] * 45 + [1] * 10 + [0.01] * 45) In [5]: index = np.array(range(100)) In [6]: primitive.produce(errors=errors, index=index) Out[6]: array([[44. , 55. , 2.19458128]])