forked from numenta/htm.java
-
Notifications
You must be signed in to change notification settings - Fork 0
Anomaly Detection Module
David Ray edited this page Feb 21, 2015
·
20 revisions
As part of the Network API development effort, it was decided that the production of a Java™ version of the Python NuPIC Network API Demo(s) (PNA) would be one of its downstream validating deliverables. One of the PNA Demo's dependencies was the as of yet uncompleted Anomaly/AnomalyLikelihood computation classes. As such, a giant segue (read sidetrack :-P) was born!
So as a result we now have a major piece of functionality added to the "Algorithms" package which contains the classes organized around CLA Classification.
There are 3 explicit modes in which anomaly functionality can be used:
Static call to obtain anomaly score.
Ex.int[] currentlyActiveColumns = { 3, 5, 7 }; // Array containing col indexes int[] predictedActiveColumns = { 2, 5, 6 }; double score = Anomaly.computeRawAnomalyScore(currentlyActiveColumns, predictedActiveColumns);
Factory instantiation of Anomaly instance.
Ex.Map<String, Object> params = new HashMap<>(); params.put(KEY_MODE, Mode.PURE); // May be Mode.LIKELIHOOD params.put(KEY_USE_MOVING_AVG, true); // Instructs the Anomaly class to compute moving average params.put(KEY_WINDOW_SIZE, 10); // #of inputs over which to compute the moving average params.put(KEY_IS_WEIGHTED, true); // Use a weighted moving average or not Anomaly anomalyComputer = Anomaly.create(params); double score = anomalyComputer.compute(currentlyActiveColumns, predictedActiveColumns, 0, 0);
Likelihood Prediction
Ex.Map<String, Object> params = new HashMap<>(); params.put(KEY_MODE, Mode.LIKELIHOOD); params.put(KEY_USE_MOVING_AVG, true); params.put(KEY_WINDOW_SIZE, 10); params.put(KEY_IS_WEIGHTED, true); Anomaly anomalyComputer = Anomaly.create(params);
- Introduction (Home)
- History & News Archives...
- Usability
- Architecture
- NAPI Quick Start Guide
- NAPI In Depth
- Roadmap
- Browse Java Docs
- Build Instructions
- Eclipse (Dev Setup)
- Anomaly Prediction
- Test Coverage Reports
- [Cortical.io Demos] (https://github.com/numenta/htm.java-examples/tree/master/src/main/java/org/numenta/nupic/examples/cortical_io)
- Hot Gym Demo
- What needs doing?
- Performance Benchmarks with jmh - blog
- BLOG: Join the "cogmission"