This repository has been archived by the owner on Dec 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Examples
Eron Wright edited this page Mar 14, 2016
·
13 revisions
Wiki ▸ Examples
A few examples are provided to familiarize you with using NuPIC in a Flink environment.
The Hot Gym example is based on the well-known example in NuPIC: One Hot Gym Prediction Tutorial. See also the HTM.java implementation [here] (https://github.com/numenta/htm.java-examples/tree/master/src/main/java/org/numenta/nupic/examples/napi/hotgym).
The flink-htm embodiment is at flink-htm-examples/.../hotgym/HotGym.scala.
Launch the hotgym Flink job:
[flink-htm-examples]$ bin/run-example hotgym.Demo --input file://`pwd`/data/rec-center-hourly-no-header.csv --output file:///tmp/hotgym-output.csv
Examine the output once the job completes. The output file consists of four columns - datetime, Speed (actual), Speed (predicted), Anomaly Score.
[flink-htm-examples]$ cat /tmp/hotgym-output.csv
07/02/10 00:00,21.2,0.0,1.0
07/02/10 01:00,16.4,21.2,1.0
07/02/10 02:00,4.7,16.4,1.0
07/02/10 03:00,4.7,4.7,1.0
07/02/10 04:00,4.6,4.7,1.0
...
12/31/10 19:00,10.5,21.1,0.65
12/31/10 20:00,5.3,10.5,0.075
12/31/10 21:00,5.1,5.3,0.175
12/31/10 22:00,5.0,5.1,0.025
Getting Started
Using
Development