Detects anomalies in a time series of dated observations, using Yahoo EGADS' adaptive kernel density change point detector. Normally obtained via RegressionBuilder.buildAnomalyDetector, which constructs and trains the model in one step. Call anomalies() or topAnomalies() to retrieve the intervals detected from anomalyStartDate onwards, measured against a double exponential smoothing forecast used as the expected baseline.
Properties
| Property | Returns | Description |
|---|---|---|
| name | String | Name of this model, inherited from the RegressionBuilder it was built from. Used only to identify the model in log messages and has no effect on detection. |
Methods
getName()
Returns: String
Name of this model, inherited from the RegressionBuilder it was built from. Used only to identify the model in log messages and has no effect on detection.
train()
Returns: void
Trains the underlying double exponential smoothing model against the actual data points, then reflectively pulls out its internal forecaster so predicted values can be generated for anomaly detection. Called automatically by RegressionBuilder.buildAnomalyDetector; safe to call again to retrain from the same data.
anomalies()
Returns: List<AnomalyInterval>
Detects anomalies by comparing the actual observations against predicted values generated from the trained model, using anomalyStartDate as the point after which anomalies are looked for. The result is computed once, on first call, and cached for subsequent calls.
topAnomalies(int maxAnoms, double minScore)
Returns: List<AnomalyInterval>
Filters the detected anomalies to those scoring at least minScore, sorts them by score in ascending order, then returns at most maxAnoms of them from the start of that sorted list.
| Parameter | Description |
|---|---|
maxAnoms | the maximum number of anomalies to return |
minScore | the minimum anomaly score an interval must have to be included |