numenta/htm.java

Encodings Configuration Mapping Has Redundant Mapping

cogmission opened this issue · 0 comments

The Map holding encoder parameters contains a key which repeats values on a nested level. The nested (child) level designated by the key fieldEncodingsis the one actually used (and not the parent level keys). Care should be taken to remove the parent Encoding values and leave in the nested key and its parameter values.

This can be verified by calling (connections.printParameters()](https://github.com/numenta/htm.java/blob/master/src/main/java/org/numenta/nupic/model/Connections.java#L2114) and not having the keys show up in the "other" section - for instance:

Other: {
random:org.numenta.nupic.util.MersenneTwister@2ed2d9cb
seed:42
n:500
w:21
minVal:0.0
maxVal:0.0
radius:0.0
resolution:0.0
periodic:false
clipInput:false
forced:false
fieldName:alarm
fieldType:string
encoderType:SDRCategoryEncoder <-- HERE AND ABOVE ARE ALL PARENT LEVEL KEYS (UNUSED)
// BELOW FIELD "fieldEncodings" IS ACTUALLY USED
fieldEncodings:{alarm={clipInput=false, maxVal=0.0, fieldName=alarm, minVal=0.0, periodic=false, forced=false, w=21, radius=0.0, resolution=0.0, fieldType=string, n=500, encoderType=SDRCategoryEncoder}}
hasClassifiers:false
}

Also:
the following method: Connections.getPrintString() should do the same...