Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/htm/algorithms/SpatialPooler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ void SpatialPooler::initialize(

inhibitionRadius_ = 0;

connections_.initialize(numColumns_, synPermConnected_);
connections_.initialize(numColumns_, synPermConnected_, /*timeseries=*/false); //TODO try TS on
for (Size i = 0; i < numColumns_; ++i) {
connections_.createSegment( static_cast<CellIdx>(i) , 1 /* max segments per cell is fixed for SP to 1 */);

Expand Down
4 changes: 2 additions & 2 deletions src/htm/algorithms/SpatialPooler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SpatialPooler : public Serializable
UInt stimulusThreshold = 0u,
Real synPermInactiveDec = 0.008f,
Real synPermActiveInc = 0.05f,
Real synPermConnected = 0.1f,
Real synPermConnected = 0.2f,
Real minPctOverlapDutyCycles = 0.001f,
UInt dutyCyclePeriod = 1000u,
Real boostStrength = 0.0f,
Expand Down Expand Up @@ -221,7 +221,7 @@ class SpatialPooler : public Serializable
UInt numActiveColumnsPerInhArea = 0,
UInt stimulusThreshold = 0u,
Real synPermInactiveDec = 0.01f, Real synPermActiveInc = 0.1f,
Real synPermConnected = 0.1f, Real minPctOverlapDutyCycles = 0.001f,
Real synPermConnected = 0.2f, Real minPctOverlapDutyCycles = 0.001f,
UInt dutyCyclePeriod = 1000u, Real boostStrength = 0.0f,
Int seed = 1, UInt spVerbosity = 0u, bool wrapAround = true);

Expand Down
3 changes: 2 additions & 1 deletion src/htm/algorithms/TemporalMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void TemporalMemory::initialize(
NTA_CHECK(connectedPermanence >= 0.0 && connectedPermanence <= 1.0);
NTA_CHECK(permanenceIncrement >= 0.0 && permanenceIncrement <= 1.0);
NTA_CHECK(permanenceDecrement >= 0.0 && permanenceDecrement <= 1.0);
NTA_CHECK(fabs(connectedPermanence - initialPermanence) < 2*std::min(permanenceIncrement, permanenceDecrement)) << "Initial permanences should be with 2 increment(decrement) steps from the connected threshold. (Soft recommendation).";
NTA_CHECK(minThreshold <= activationThreshold);

// Save member variables
Expand All @@ -130,7 +131,7 @@ void TemporalMemory::initialize(
externalPredictiveInputs_ = externalPredictiveInputs;

// Initialize member variables
connections_ = Connections(static_cast<CellIdx>(numberOfColumns() * cellsPerColumn_), connectedPermanence_);
connections_ = Connections(static_cast<CellIdx>(numberOfColumns() * cellsPerColumn_), connectedPermanence_, /*timeseries=*/false); //TODO try TS true
rng_ = Random(seed);

maxSegmentsPerCell_ = maxSegmentsPerCell;
Expand Down
8 changes: 4 additions & 4 deletions src/htm/algorithms/TemporalMemory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class TemporalMemory : public Serializable
CellIdx cellsPerColumn = 32,
SynapseIdx activationThreshold = 13,
Permanence initialPermanence = 0.21,
Permanence connectedPermanence = 0.50,
Permanence connectedPermanence = 0.20,
SynapseIdx minThreshold = 10,
SynapseIdx maxNewSynapseCount = 20,
Permanence permanenceIncrement = 0.10,
Expand All @@ -147,7 +147,7 @@ class TemporalMemory : public Serializable
Int seed = 42,
SegmentIdx maxSegmentsPerCell = 255,
SynapseIdx maxSynapsesPerSegment = 255,
bool checkInputs = true,
bool checkInputs = false,
UInt externalPredictiveInputs = 0,
ANMode anomalyMode = ANMode::RAW
);
Expand All @@ -158,7 +158,7 @@ class TemporalMemory : public Serializable
CellIdx cellsPerColumn = 32,
SynapseIdx activationThreshold = 13,
Permanence initialPermanence = 0.21,
Permanence connectedPermanence = 0.50,
Permanence connectedPermanence = 0.20,
SynapseIdx minThreshold = 10,
SynapseIdx maxNewSynapseCount = 20,
Permanence permanenceIncrement = 0.10,
Expand All @@ -167,7 +167,7 @@ class TemporalMemory : public Serializable
Int seed = 42,
SegmentIdx maxSegmentsPerCell = 255,
SynapseIdx maxSynapsesPerSegment = 255,
bool checkInputs = true,
bool checkInputs = false,
UInt externalPredictiveInputs = 0,
ANMode anomalyMode = ANMode::RAW
);
Expand Down