Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (25 loc) · 1.79 KB

README.md

File metadata and controls

44 lines (25 loc) · 1.79 KB

Numenta Logo NuPIC

Basic Spatial Pooler Example

hello_sp.py contains a simple spatial pooler demonstration written in python.

To run

python hello_sp.py

Details

This script provides 3 examples demonstrating the effects of the spatial pooler on the following 3 sets of input values:

  1. Displaying the output SDRs of 3 randomized input values.
  2. Displaying 3 SDR's generated from the same input value.
  3. Displaying 3 SDR's generated with slightly different input values, by adding 10% and 20% noise to the original input vector.

The script uses a simple binary vector for input.

After running this example and reading through the output you should have a basic understanding of the relationship between input and output of the spatial pooler.

Further reading: Encoders

Second Spatial Pooler Example

sp_tutorial.py replicates figures 5, 7 and 9 from the paper Porting HTM Models to the Heidelberg Neuromorphic Computing Platform. This will show some basic properties of the spatial pooler.

To run

python sp_tutorial.py

Details

The script is divided in three parts, each of them addressing one of the following questions:

  1. What is the distribution of the overlap scores in a spatial pooler for a random binary input?
  2. How robust is the spatial pooler against input noise when untrained?
  3. How robust is it after training?

More details can be found in the comments of the script as well as in its command-line output.