I am trying to train an SDRClassifier, but I cannot get even the first training pattern to “compute”. I get an error message: (I am using your docker image on linux)
File "/usr/local/lib/python2.7/dist-packages/nupic.bindings-1.0.7.dev0-py2.7-linux-x86_64.egg/nupic/bindings/algorithms.py", line 3140, in compute
for i in xrange(len(arrayResult["actualValues"])):
KeyError: 'actualValues'
I put some print statements in nupic/bindings/algorithms.py to see what was going on and have determined that the above error message arises because arrayResult[“actualValues”] does not exist, i.e. arrayResult is an empty dict, and this traces back to a few lines above to this call:
result = self.convertedCompute(
recordNum, patternNZ, bucketIdxList,
actValueList, category, learn, infer)
Here the result is also an empty dict. I have printed out all the arguments to the call to self.convertedCompute() below, which all look as I expected, so I do not understand why nothing comes back from this call?
('len(PatternNZ)', 2048)
('max(patternNZ)', 1.0)
('patternNZ indices', array([ 98, 135, 348, 355, 508, 767, 830, 831, 860, 885, 929,
956, 1070, 1131, 1157, 1329, 1407, 1431, 1591, 1600, 1603, 1633,
1655, 1697, 1716, 1718, 1725, 1764, 1776, 1783, 1815, 1824, 1851,
1870, 1907, 1917, 1972, 1977, 1981, 2039]))
('bucketIdxList', [925])
('actValueList', [925])
('category', True)
('recordNum', 1)
('learn', True)
('infer', False)
('result', {})