NuPIC API Docs
|NuPIC API Docs||NuPIC Core API Docs|
A detailed introduction to the components of NuPIC. Includes encoders, the spatial pooler, and swarming. Contains live code running in an iPython Notebook, which is included as a reference.
The “hot gym” sample application has been around for a long time, and was one of the first real-world applications of NuPIC that actually worked. The data used is real energy consumption data from a gym in Australia. It is aggregated hourly already, so the input CSV file simply contains a timestamp and float value for energy consumption during that hour.
This tutorial shows how to take that data file, create a swarm to find the best NuPIC Model parameters, then use those Model parameters to create a NuPIC Model and feed the data into it, getting 1-step-ahead predictions for each row of data being fed into NuPIC. Essentially, this example shows how NuPIC can predict the energy consumption of a building one hour into the future.
Following where the One Hot Gym Prediction Tutorial leaves off, this screencast and example app shows you how to convert to an anomaly detection model using the same data set.
|One Hot Gym Prediction Tutorial||One Hot Gym Anomaly Tutorial|
|Source Code & README||Source Code & README|
A walkthrough of the HTM Engine, which allows users to create and run hundreds of anomaly detection NuPIC models simultaneously, with an example application of New York City live traffic speeds.
- NuPIC Geospatial Tracking Tutorial: This video describes the NuPIC Geospatial Tracking application and shows how it can be used to analyze GPS data. Source Code
- OPF example processing CPU Usage
- Spatial Pooling example
- Temporal Memory example
- text-based word classification
- audio processing (doesn’t work well, but has potential)
- Multiple Hierarchical Levels with Classifiers and Anomaly Detection
- Other Projects Using NuPIC
Swarming Using Multiple Fields
Subutai Ahmad put together a set of examples. They demonstrate swarming for prediction and anomaly detection models. The example shows how to use swarming to select between multiple fields and the effect of noise. It uses the same sine wave dataset used in the sine wave tutorial above.
Creating CSV Data Files
There are a myriad of free online data sets that could be processed and used as input for NuPIC models.
Tips and Tricks
Put dates in increasing order - typically time should always be increasing for NuPIC.
Format dates correctly - YYYY-MM-DD HH:MM:SS
Specify date in the included fields attribute of the model parameters
Specify min/max values for numerical data fields. Performance is usually a bit better with the min/max specified.
For best accuracy, it is usually best to swarm for each prediction step individually as we have found that the parameters are slightly different for different prediction windows. If you specify both 1 and 10, I believe the swarm will optimize for 1. In my experiments I did separate swarms for 1 step and 10 step prediction.