Skip to content

htm-community/sanity-nupic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sanity for NuPIC

A NuPIC backend for Sanity.

Videos:

How to use it

pip install sanity-nupic

Current version: 0.0.15

Now, just patch your model.

CLAModel

import htmsanity.nupic.runner as sanity
sanity.patchCLAModel(model)

Temporal Memory

import htmsanity.nupic.runner as sanity
sanity.patchTM(tm)

Sanity will automatically open in a web browser.

Don't let your Python script exit. If necessary, add this to the end:

import time
time.sleep(999999)

How to develop it

Clone sanity-nupic, and fetch the submodules:

cd sanity-nupic
git submodule update --init --recursive

Install the sanity-nupic python package;

python setup.py develop --user

Compile Sanity from ClojureScript to JavaScript. You'll need Leiningen, which you can get through brew install leiningen, or just follow instructions on the website.

Install Comportex, a Sanity dependency.

git clone https://github.com/htm-community/comportex.git
cd comportex
lein install

Compile Sanity to JavaScript.

# Requires JVM
cd htmsanity/nupic/sanity
lein cljsbuild once demos

Other usage

Try a custom example.

git clone https://github.com/htm-community/sanity-nupic.git
cd sanity-nupic

# Hello world
python examples/hotgym.py

# Requires matplotlib
python examples/hotgym_plotted.py

# Requires nupic.research
python examples/research_feedback.py

Stackable time series

See this notebook. You can create your own segment lifetimes diagrams inside a notebook.

Releases

No releases published

Packages

No packages published

Languages