yahoo / egads

A Java package to automatically detect anomalies in large scale time-series data
Other
1.17k stars 330 forks source link

About DBScanModel #35

Open AutumnLight opened 7 years ago

AutumnLight commented 7 years ago

I am reading the source code, but can't understand DBScanModel, the 'detect' method which judge a point whether or not an anomly in DBScanModel.java, it just judges observedValue != expectedValue, so I am confuse if it is useful for using DBScanClusterer to cluster the points.

if (observedSeries.get(p.getId()).value != expectedSeries.get(p.getId()).value && ((((unixTime - observedSeries.get(p.getId()).time) / 3600) < maxHrsAgo) || (maxHrsAgo == 0 && p.getId() == (n - 1)))) { output.add(new Interval(observedSeries.get(p.getId()).time, p.getId(), errors, thresholdErrors, observedSeries.get(p.getId()).value, expectedSeries.get(p.getId()).value)); }