![]() ![]() ![]()
|
A NuPIC Directories, Elements, and Help
This appendix gives an overview of the NuPIC components and explains how to get online help.
Topics
NuPIC Directory Structure
This section gives an overview of the NuPIC directory structure.
NuPIC Python Modules
The
nupicpackage contains all Numenta Python support. It includes utility routines for configuring and saving HTM networks, as well as routines for launching the Numenta Runtime Engine and using the Runtime Engine for training and testing HTM networks. The most important packages in NuPIC Tools are:
nupic.network- Contains modules for configuring, saving and running HTM networks. Includes helper functions and APIs for launching and managing the Numenta Runtime Engine.nupic.analysis- Contains modules for analyzing and visualizing HTM networks and their inputs and outputs. Also contains utilities for constructing large-scale experiments for HTM networks and problem parameterizations.For information on each package, call
help(<package>), for example:NuPIC Node Types
This section gives an overview of the available nodes. Extensive online help for each node is available. See How to Access NuPIC Built-in Help.
- VectorFileSensor is a sensor that reads in text or csv (comma-separated values) files containing lists of vectors and outputs these vectors in sequence. The output is updated each time the sensor's
compute()method is called. IfrepeatCountis greater than 1, each vector is repeated that many times before moving to the next one. The sensor loops when the end of the vector list is reached.If the file contains an incorrect number of floats, the sensor has no way of checking assignments. Currently it silently ignore the last vector of floats if there is an incorrect number.
- py.ImageSensor is a custom sensor created as a Python plug-in. This sensor was originally designed for the Pictures example but has been expanded to handle grayscale images. Because this node has been implemented in Python (not C++), getting help for it differs from getting help for other nodes. Use one of the following:
nodeHelp("py.ImageSensor") nodeHelp("py.ImageSensor")See the Vision Framework Guide for more information.
- SpatialPoolerNode and TemporalPoolerNode are the learning nodes that are usually used for all levels except the top level. The learning nodes implements the algorithm described in the Numenta Node Algorithms Guide. See Affecting Learning Node Behavior With Node Parameters in Advanced NuPIC Programming for an introduction to node parameters.
- py.GarborNode - Performs Garbor filtering (spatial pooling). The algorithm of this in this node is customized to work with image applications. Node input must come from an
ImageSensoror from a node with identical output format. See theImagesexample.- Zeta1TopNode - In learning mode,
Zeta1TopNodelearns coincidences and the mapping of those coincidences to categories. In inference mode,Zeta1TopNodecomputes to which category the input vector belongs. The output ofZeta1TopNodeis thus a distribution over the categories ofZeta1TopNode, representing how likely the input vector is to belong to each of those categories.See Affecting Learning Node Behavior With Node Parameters in Advanced NuPIC Programming for a discussion of
Zeta1TopNodeparameters and the Numenta Node Algorithms Guide.- py.SVMClassifierNode - Implements the SVM (support vector machines) algorithm.
- py.KNNClassifierNode - Implements the KNN (k-nearest neighbor) algorithm. The node can perform learning and inference simultaneously.
- VectorFileEffector is an effector that writes its inputs to a text file. You can specify the target filename using the
setFileexecute command at runtime.- PassThroughNode copies its input to its output. Both input and output must have 4-byte elements.
PassThroughNodesmight be useful if a sensor needs to connect to a node that's not at phase 1.How to Access NuPIC Built-in Help
The NuPIC APIs contain extensive built-in help. You can use Pydoc and Python's built-in help to get a complete online reference manual for the APIs. This section explains how you can access that help:
Using Pydoc
a. Type
pydoc -g.b. Select Open Browser in the window that is displayed.
c. Click nupic for help on NuPIC.
Getting Help for Nodes and Helper Functions
In NuPIC, node types are implemented as plugins, so pydoc cannot generate help on node-specific parameters and commands. NuPIC includes
nodeHelp, which reads in each plugin's specification and displays help for the corresponding node. For example, the following command generates extensive online help forSpatialPoolerNode:If the node is implemented as a Python plug-in, you can choose one of the following ways to invoke node help:
For the helper functions, you can display help as follows:
You can also display help for individual helpers:
|
Numenta www.Numenta.com |
![]() ![]() ![]()
|