Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

ChangeFinder Anomaly and Change-Point Detector #305

Closed
wants to merge 9 commits into from

Conversation

L3Sota
Copy link
Contributor

@L3Sota L3Sota commented Jun 17, 2016

Statistical Anomaly and Change-Point detection of discrete time series data via fitting to an SDAR (Sequentially Discounting Autoregressive) Model.

Input

Takes a single n-dimensional vector of doubles as the next point in the time series. Multiple calls automatically update the internal SDAR model.

cf_detect(array<double> x[, const string options])

Output

A struct containing the following 4 elements:

[
double anomaly_score, 
boolean anomaly_detected, 
double changepoint_score, 
boolean changepoint_detected
]

Notes

  • The time series must be discrete (continuous valued time series are not supported).
  • The first a + c calls after initialization usually return false positives, where a and c are the value of the options aWindow and cWindow, respectively

Articles/Slides (Japanese):

myui and others added 8 commits June 17, 2016 07:59
…etected.

Removed -dim option accordingly. Also changed some initial parameter values and minutiae in ChangeFinderUDFTest, and fixed a typo in MathUtils.
Implemented multiple passes for multidimensional covariances to ensure they are full-rank.
Changed internals of solving the system of equations from Cholesky Decomposition to LU Decomposition (However, after the multiple changes introduced in this commit, Cholesky Decomposition may be viable again.)
- Pretty comments describing the computation process in more detail.
- Using the initial values of the data to break in data structures instead of rand.
(Random generation tends to unpredictably reduce detection accuracy in the beginning.)
- Added a moving average for change-point scores to improve detection accuracy.
- Refactored tests
@L3Sota L3Sota changed the title Feature/cf sdar focused ChangeFinder Anomaly and Change-Point Detector Jun 17, 2016
@myui myui force-pushed the master branch 2 times, most recently from bd31b3d to ab5c19e Compare June 18, 2016 06:06
@myui
Copy link
Owner

myui commented Jun 18, 2016

@L3Sota It seems unit tests of ChangeFinder is failing.

@L3Sota
Copy link
Contributor Author

L3Sota commented Jun 19, 2016

@myui OK, will look into it.

The Java 7 Double class doesn't have a isFinite(double) method. Using isNaN(double) instead.
@myui
Copy link
Owner

myui commented Jun 21, 2016

@L3Sota Thanks for fixing ^.

@myui myui added this to the v0.5 milestone Jun 21, 2016
@myui myui self-assigned this Jun 21, 2016
@myui
Copy link
Owner

myui commented Aug 31, 2016

@L3Sota I'm revising your ChangeFinder implementation in
https://github.com/myui/hivemall/tree/feature/changefinder1d

Could you check it in your spare time?

@myui myui modified the milestones: v0.4, v0.5 Aug 31, 2016
*/
RealMatrix[][] xCovarsCombinedRaw =
new RealMatrix[xRunningWindowSize][xRunningWindowSize];
for (int i = 0; i < xRunningWindowSize; i++) {
Copy link
Owner

@myui myui Sep 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@L3Sota
Copy link
Contributor Author

L3Sota commented Sep 3, 2016

@myui

Could you check it in your spare time?

OK, will take a look at it.

@myui myui mentioned this pull request Sep 3, 2016
@myui
Copy link
Owner

myui commented Sep 3, 2016

Let's continue discussions on #333

@myui myui closed this Sep 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants