com.yahoo.egads.models.adm
Class AdaptiveKernelDensityChangePointDetector
- java.lang.Object
-
- com.yahoo.egads.models.adm.AnomalyDetectionAbstractModel
-
- com.yahoo.egads.models.adm.AdaptiveKernelDensityChangePointDetector
-
- All Implemented Interfaces:
- JsonAble, Model, AnomalyDetectionModel, java.io.Serializable
public class AdaptiveKernelDensityChangePointDetector extends AnomalyDetectionAbstractModel
AdaptiveKernelDensityChangePointDetector implements density-based algorithm for change point detection. Input: 1. the residual time-series = actual - expected 2. PRE_WINDOW_SIZE: the size of PRE_WINDOW 3. POST_WINDOW_SIZE: the size of POST_WINDOW 4. CONFIDENCE: the confidence level at which the threshold for the KL-Divergence score is computed. Output: the time indices when the distribution of residual changes significantly In particular, the algorithm slides two side-by-side windows (PRE_WINDOW and POST_WINDOW) and computes the KL-divergence between the distribution of the residuals in two windows for each time index. The distribution of the residuals in each window is computed non-parametrically using Kernel Density Estimation with Gaussian kernels with adaptive bandwidths. Once the KL-divergence is computed for each time index, it is thresholded (where the threshold is directly proportional to 'CONFIDENCE'). And finally for each continuous segment of the thresholded KL-divergence time-series, the index of the maximum value is reported as a change point.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AdaptiveKernelDensityChangePointDetector(java.util.Properties config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Anomaly.IntervalSequencedetect(TimeSeries.DataSequence observedSeries, TimeSeries.DataSequence expectedSeries)java.util.ArrayList<java.lang.Integer>detectChangePoints(float[] residuals, int preWindowSize, int postWindowSize, float confidence)voidfromJson(JSONObject json_obj)java.lang.StringgetModelName()java.lang.StringgetType()voidreset()voidtoJson(JSONStringer json_out)voidtune(TimeSeries.DataSequence observedSeries, TimeSeries.DataSequence expectedSeries, Anomaly.IntervalSequence anomalySequence)-
Methods inherited from class com.yahoo.egads.models.adm.AnomalyDetectionAbstractModel
getModelType, isDetectionWindowPoint
-
-
-
-
Constructor Detail
-
AdaptiveKernelDensityChangePointDetector
public AdaptiveKernelDensityChangePointDetector(java.util.Properties config)
-
-
Method Detail
-
toJson
public void toJson(JSONStringer json_out) throws java.lang.Exception
- Specified by:
toJsonin interfaceJsonAble- Overrides:
toJsonin classAnomalyDetectionAbstractModel- Throws:
java.lang.Exception
-
fromJson
public void fromJson(JSONObject json_obj) throws java.lang.Exception
- Specified by:
fromJsonin interfaceJsonAble- Overrides:
fromJsonin classAnomalyDetectionAbstractModel- Throws:
java.lang.Exception
-
getType
public java.lang.String getType()
-
getModelName
public java.lang.String getModelName()
- Specified by:
getModelNamein interfaceModel- Overrides:
getModelNamein classAnomalyDetectionAbstractModel
-
reset
public void reset()
-
tune
public void tune(TimeSeries.DataSequence observedSeries, TimeSeries.DataSequence expectedSeries, Anomaly.IntervalSequence anomalySequence) throws java.lang.Exception
- Throws:
java.lang.Exception
-
detect
public Anomaly.IntervalSequence detect(TimeSeries.DataSequence observedSeries, TimeSeries.DataSequence expectedSeries) throws java.lang.Exception
- Throws:
java.lang.Exception
-
detectChangePoints
public java.util.ArrayList<java.lang.Integer> detectChangePoints(float[] residuals, int preWindowSize, int postWindowSize, float confidence)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG