NuPIC
Numenta Platform for Intelligent Computing
- Build:
- Unit Test Coverage:
- Regression Tests:
NuPIC is a library that provides the building blocks for online prediction and anomaly detection systems. The library contains the Cortical Learning Algorithm (CLA), but also the [Online Prediction Framework (OPF)] (https://github.com/numenta/nupic/wiki/Online-Prediction-Framework) that allows clients to build prediction systems out of encoders, models, and metrics.
For more information, see numenta.org or the NuPIC wiki.
Installation
For all installation options, see the Installing and Building NuPIC wiki page.
Currently supported platforms:
- 64-bit Linux
- Mac OS X
- VM images
Dependencies:
- Python 2.7 (with development headers)
- Compiler toolchain with support for C++11 such as GCC >= 4.7 (Linux-only), or llvm/clang
- Make
- CMake
The python dependencies are included in platform-specific repositories for convenience. Installing from these repositories is not required if the dependencies defined above have been manually installed or already exist on your system.
- nupic-linux64 for 64-bit Linux systems
- nupic-darwin64 for 64-bit OS X systems
Complete set of python requirements are documented in requirements.txt, compatible with pip:
Installing Python Dependencies
pip install -r external/common/requirements.txt
Note: If using pip 1.5 or later:
pip install --allow-all-external --allow-unverified PIL --allow-unverified psutil -r external/common/requirements.txt
Note: If you get a "permission denied" error when using pip, you may add the
--user
flag to install to a location in your home directory, which should resolve any permissions issues. Doing this, you may need to add this location to your PATH and PYTHONPATH. Alternatively, you can run pip withsudo
.
Installing NuPIC
Move into the NuPIC installation directory and run:
python setup.py install
Note: If you get a "permission denied" error when using this, you may add the
--user
flag to install to a location in your home directory, which should resolve any permissions issues. Doing this, you may need to add this location to your PATH and PYTHONPATH. Alternatively, you can run this withsudo
.
Once it is installed, you can import NuPIC library to your python script using:
import nupic
For examples, tutorials, and screencasts about using NuPIC, see the Using NuPIC wiki page.
Developer instructions
If you want to develop, debug, or simply test NuPIC, clone it and follow the instructions below.
Using command line
This assumes the
NUPIC
environment variable is set to the directory where the NuPIC source code exists.
cd $NUPIC
python setup.py build
python setup.py develop
To run the tests:
# Python HTM Network API tests
$NUPIC/bin/py_region_test
# Python unit tests
$NUPIC/scripts/run_nupic_tests -u --coverage
# Python integration tests
$NUPIC/scripts/run_nupic_tests -i --coverage
# Python swarming tests (requires mysql)
$NUPIC/scripts/run_nupic_tests -w --coverage
# Run all tests!
$NUPIC/scripts/run_nupic_tests --all --coverage
Using an IDE
See our Development Tips wiki page for details.
To run the tests:
- Run any test project from your IDE (check
output
panel to see the results).
For more tips, please see Development-Tips
Contributing to NuPIC:
- Please see the Contributing to NuPIC wiki.
- Details on the dependency on
nupic.core
here.