Skip to content

Latest commit

 

History

History
59 lines (54 loc) · 50.3 KB

API_DIFFERENCES.md

File metadata and controls

59 lines (54 loc) · 50.3 KB

Parameter Differences

This is a comparison of parameters for python versions of this repository htm.core and Numenta's NuPIC. Along with the API_CHANGELOG this serves as a guide when migrating your code or comparing the frameworks.

RDSE

HTMCore Numenta's NuPIC
Attribute Description Default Attribute Description Default
size Member "size" is the total number of bits in the encoded output SDR. Was "n" in Numenta's NuPIC 0 n Number of bits in the representation (must be > w). n must be large enough such that there is enough room to select new representations as the range grows. With w=21 a value of n=400 is typical. The class enforces n > 6*w. 400
sparsity Member "sparsity" is the fraction of bits in the encoded output which this encoder will activate. This is an alternative way to specify the member "activeBits". 0
resolution Member "resolution" Two inputs separated by greater than, or equal to the resolution are guaranteed to have different representations. 0 resolution A floating point positive number denoting the resolution of the output representation. Numbers within [offset-resolution/2, offset+resolution/2] will fall into the same bucket and thus have an identical representation. Adjacent buckets will differ in one bit. resolution is a required parameter. -
activeBits Member "activeBits" is the number of true bits in the encoded output SDR. Was "w" in Numenta's NuPiC w Number of bits to set in output. w must be odd to avoid centering problems. w must be large enough that spatial pooler columns will have a sufficiently large overlap to avoid false matches. A value of w=21 is typical. 21
radius Member "radius" Two inputs separated by more than the radius have non-overlapping representations. Two inputs separated by less than the radius will in general overlap in at least some of their bits. You can think of this as the radius of the input.
Category Member "category" means that the inputs are enumerated categories. If true then this encoder will only encode unsigned integers, and all inputs will have unique / non-overlapping representations. FALSE
numBuckets
name None
offset A floating point offset used to map scalar inputs to bucket indices. The middle bucket will correspond to numbers in the range [offset - resolution/2, offset + resolution/2). If set to None, the very first input that is encoded will be used to determine the offset. None
                                                                                                                                                                                                                                                                                |              | offset     | A floating point offset used to map scalar inputs to bucket indices\. The middle bucket will correspond to numbers in the range \[offset \- resolution/2, offset \+ resolution/2\)\. If set to None, the very first input that is encoded will be used to determine the offset\.                                | None    |

Spatial Pooler

HTMCore Numenta's NuPIC
Attribute Description Default Attribute Description Default
inputDimensions A list of integers representing the dimensions of the input vector. Format is [height, width,depth, ...], where each value represents the size of the dimension. For a topology of one dimensions with 100 inputs use [100]. For a two dimensional topology of 10x5 use [10,5]. - inputDimensions A sequence representing the dimensions of the input vector. Format is (height, width, depth, ...), where each value represents the size of the dimension. For a topology of one dimension with 100 inputs use 100, or (100,). For a two dimensional topology of 10x5 use (10,5).  -
columnDimensions A list of integers representing the dimensions of the columns in the region. Format is [height, width, depth, ...], where each value represents the size of dimension. For a topology of one dimensions with 2000 use 2000, or [2000]. For a three dimensional of 32x64x16 use [32, 64, 16]. - columnDimensions (is columnCount in params file) A sequence representing the dimensions of the columns in the region. Format is (height, width, depth, ...), where each value represents the size of the dimension. For a topology of one dimension with 2000 columns use 2000, or (2000,). For a three dimensional topology of 32x64x16 use (32, 64, 16).  -
potentialRadius This parameter determines the extent of the input that each column can potentially be connected to. This can be thought of as the input bits that are visible to each column, or a 'receptive field' of the field of vision. A large enough value will result in global coverage, meaning that each column can potentially be connected to every input bit. This parameter defines a square (or hyper square) area: a column will have a max square potential pool with sides of length (2 * potentialRadius + 1). 16 potentialRadius This parameter determines the extent of the input that each column can potentially be connected to. This can be thought of as the input bits that are visible to each column, or a ‘receptiveField’ of the field of vision. A large enough value will result in ‘global coverage’, meaning that each column can potentially be connected to every input bit. This parameter defines a square (or hyper square) area: a column will have a max square potential pool with sides of length 2 * potentialRadius + 1. Default 16. 16
potentialPct The percent of the inputs, within a column's potential radius, that a column can be connected to. If set to 1, the column will be connected to every input within its potential radius. This parameter is used to give each column a unique potential pool when a large potentialRadius causes overlap between the columns. At initialization time we choose ((2*potentialRadius + 1)^(# inputDimensions) * potentialPct) input bits to comprise the column's potential pool. 0.5 potentialPct The percent of the inputs, within a column’s potential radius, that a column can be connected to. If set to 1, the column will be connected to every input within its potential radius. This parameter is used to give each column a unique potential pool when a large potentialRadius causes overlap between the columns. At initialization time we choose ((2*potentialRadius + 1)^(# inputDimensions) * potentialPct) input bits to comprise the column’s potential pool. Default 0.5. 0.5
globalInhibition If true, then during inhibition phase the winning columns are selected as the most active columns from the region as a whole. Otherwise, the winning columns are selected with respect to their local neighborhoods. Global inhibition boosts performance significantly but there is no topology at the output. TRUE globalInhibition If true, then during inhibition phase the winning columns are selected as the most active columns from the region as a whole. Otherwise, the winning columns are selected with respect to their local neighborhoods. Using global inhibition boosts performance x60. Default False. TRUE
localAreaDensity The desired density of active columns within a local inhibition area (the size of which is set by the internally calculated inhibitionRadius, which is in turn determined from the average size of the connected potential pools of all columns). The inhibition logic will insure that at most N columns remain ON within a local inhibition area, where N = localAreaDensity * (total number of columns in inhibition area).  0.05 localAreaDensity The desired density of active columns within a local inhibition area (the size of which is set by the internally calculated inhibitionRadius, which is in turn determined from the average size of the connected potential pools of all columns). The inhibition logic will insure that at most N columns remain ON within a local inhibition area, where N = localAreaDensity * (total number of columns in inhibition area). Default -1.0. -1
- - - numActiveColumnsPerInhArea An alternate way to control the density of the active columns. If numActiveColumnsPerInhArea is specified then localAreaDensity must be less than 0, and vice versa. When using numActiveColumnsPerInhArea, the inhibition logic will insure that at most ‘numActiveColumnsPerInhArea’ columns remain ON within a local inhibition area (the size of which is set by the internally calculated inhibitionRadius, which is in turn determined from the average size of the connected receptive fields of all columns). When using this method, as columns learn and grow their effective receptive fields, the inhibitionRadius will grow, and hence the net density of the active columns will decrease. This is in contrast to the localAreaDensity method, which keeps the density of active columns the same regardless of the size of their receptive fields. Default 10.0. 10
stimulusThreshold This is a number specifying the minimum number of synapses that must be active in order for a column to turn ON. The purpose of this is to prevent noisy input from activating columns. 0 stimulusThreshold This is a number specifying the minimum number of synapses that must be on in order for a columns to turn ON. The purpose of this is to prevent noise input from activating columns. Specified as a percent of a fully grown synapse. Default 0. 0
synPermInactiveDec The amount by which the permanence of an inactive synapse is decremented in each learning step. 0.008 synPermInactiveDec The amount by which an inactive synapse is decremented in each round. Specified as a percent of a fully grown synapse. Default 0.008. 0.008
synPermActiveInc The amount by which the permanence of an active synapse is incremented in each round. 0.05 synPermActiveInc he amount by which an active synapse is incremented in each round. Specified as a percent of a fully grown synapse. Default 0.05. 0.05
synPermConnected The default connected threshold. Any synapse whose permanence value is above the connected threshold is a "connected synapse", meaning it can contribute to the cell's firing. 0.1 synPermConnected The default connected threshold. Any synapse whose permanence value is above the connected threshold is a “connected synapse”, meaning it can contribute to the cell’s firing. Default 0.1. 0.1
boostStrength A number greater or equal than 0, used to control boosting strength. No boosting is applied if it is set to 0. The strength of boosting increases as a function of boostStrength. Boosting encourages columns to have similar activeDutyCycles as their neighbors, which will lead to more efficient use of columns. However, too much boosting may also lead to instability of SP outputs. 0 boostStrength A number greater or equal than 0.0, used to control the strength of boosting. No boosting is applied if it is set to 0. Boosting strength increases as a function of boostStrength. Boosting encourages columns to have similar activeDutyCycles as their neighbors, which will lead to more efficient use of columns. However, too much boosting may also lead to instability of SP outputs. Default 0.0 0
wrapAround boolean value that determines whether or not inputs at the beginning and end of an input dimension are considered neighbors for the purpose of mapping inputs to columns. TRUE wrapAround Determines if inputs at the beginning and end of an input dimension should be considered neighbors when mapping columns to inputs. Default True. TRUE
minPctOverlapDutyCycle A number between 0 and 1.0, used to set a floor on how often a column should have at least stimulusThreshold active inputs. Periodically, each column looks at the overlap duty cycle of all other column within its inhibition radius and sets its own internal minimal acceptable duty cycle to: minPctDutyCycleBeforeInh * max(other columns' duty cycles). On each iteration, any column whose overlap duty cycle falls below this computed value will get all of its permanence values boosted up by synPermActiveInc. Raising all permanences in response to a sub-par duty cycle before inhibition allows a cell to search for new inputs when either its previously learned inputs are no longer ever active, or when the vast majority of them have been "hijacked" by other columns. 0.001 minPctOverlapDutyCycle A number between 0 and 1.0, used to set a floor on how often a column should have at least stimulusThreshold active inputs. Periodically, each column looks at the overlap duty cycle of all other columns within its inhibition radius and sets its own internal minimal acceptable duty cycle to: minPctDutyCycleBeforeInh * max(other columns’ duty cycles). On each iteration, any column whose overlap duty cycle falls below this computed value will get all of its permanence values boosted up by synPermActiveInc. Raising all permanences in response to a sub-par duty cycle before inhibition allows a cell to search for new inputs when either its previously learned inputs are no longer ever active, or when the vast majority of them have been “hijacked” by other columns. Default 0.001. 0.001
dutyCyclePeriod The period used to calculate duty cycles. Higher values make it take longer to respond to changes in boost. Shorter values make it potentially more unstable and likely to oscillate. 1000 dutyCyclePeriod The period used to calculate duty cycles. Higher values make it take longer to respond to changes in boost or synPerConnectedCell. Shorter values make it more unstable and likely to oscillate. Default 1000. 1000

Temporal Memory

HTMCore Numenta's NuPIC
Attribute Description Default Attribute Description Default
columnDimensions Dimensions of the column space - columnDimensions Dimensions of the column space. Default value ``[2048]``. 2048
cellsPerColumn Number of cells per column 32 cellsPerColumn Number of cells per column. Default value ``32``. 32
activationThreshold If the number of active connected synapses on a segment is at least this threshold, the segment is said to be active. 13 activationThreshold If the number of active connected synapses on a segment is at least this threshold, the segment is said to be active. Default value ``13``. 13
initialPermanence Initial permanence of a new synapse. 0.21 initialPermanence Initial permanence of a new synapse. Default value ``0.21``. 0.21
connectedPermanence If the permanence value for a synapse is greater than this value, it is said to be connected. 0.5 connectedPermanence If the permanence value for a synapse is greater than this value, it is said to be connected. Default value ``0.5``. 0.5
minThreshold  If the number of potential synapses active on a segment is at least this threshold, it is said to be "matching" and is eligible for learning. 10 minThreshold If the number of potential synapses active on a segment is at least this threshold, it is said to be "matching" and is eligible for learning. Default value ``10``. 10
maxNewSynapseCount The maximum number of synapses added to a segment during learning. 20 maxNewSynapseCount The maximum number of synapses added to a segment during learning. Default value ``20``. 20
permanenceIncrement Amount by which permanences of synapses are incremented during learning. 0.10 permanenceIncrement Amount by which permanences of synapses are incremented during learning. Default value ``0.1``. 0.1
permanenceDecrement Amount by which permanences of synapses are decremented during learning. 0.10 permanenceDecrement Amount by which permanences of synapses are decremented during learning. Default value ``0.1``. 0.1
predictedSegmentDecrement Amount by which segments are punished for incorrect predictions. Note: A good value is just a bit larger than (the column-level sparsity * permanenceIncrement). So, if column-level parsity is 2% and permanenceIncrement is 0.01, this parameter should be something like 4% * 0.01 = 0.0004). 0.0 predictedSegmentDecrement Amount by which segments are punished for incorrect predictions. Default value ``0.0``. 0
maxSegmentsPerCell The maximum number of segments per cell. The value you can choose here is limited by the type SegmentIdx in Connections.hpp, change it if you need larger values.  255 maxSegmentsPerCell The maximum number of segments per cell. Default value ``255``. 255
maxSynapsesPerSegment The maximum number of synapses per segment. The value you can choose here is limited by the type SynapseIdx in Connections.hpp, change it there if you needed to use large values. 255 maxSynapsesPerSegment The maximum number of synapses per segment. Default value ``255``. 255
checkInputs  Whether to check that the activeColumns are sorted without duplicates. Disable this for a small speed boost. DEPRECATED: The SDR class now enforces these properties. TRUE
externalPredictiveInputs Number of external predictive inputs.  These values are not related to this TM, they represent input from a different region. This TM will form synapses with these inputs in addition to the cells which are part of this TemporalMemory. If this is given (and greater than 0) then the active cells and winner cells of these external inputs must be given to methods TM.compute and TM.activateDendrites 0
anomalyMode how is `TM.anomaly` computed. Options ANMode {DISABLED, RAW, LIKELIHOOD, LOGLIKELIHOOD} ANMode::RAW