numenta / nupic-legacy

Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
http://numenta.org/
GNU Affero General Public License v3.0
6.33k stars 1.56k forks source link

SDR Classifier prediction confidence is NaN #3875

Open rhyolight opened 5 years ago

rhyolight commented 5 years ago

As reported by Phil at https://discourse.numenta.org/t/sdrclassifier-returning-confidence-of-nan/5972:

I’ve created various models where after the model has run for some time the classifier confidence value starts returning NaN.

As a sanity check, I’ve gone back to the standard hotgym example (http://nupic.docs.numenta.org/stable/quick-start/network.html) and found that it too suffers from this problem. For data, I am using the rec-center-hourly.csv file (https://github.com/numenta/nupic/tree/master/examples/opf/clients/hotgym/prediction/one_gym), but I am replicating/extending the data to have 30000 time steps (rather than the default 4394 times points). Nothing else is being changed from the default hotgym code/model. Specifically, at about the 19000th data point, the 5-step ahead confidence starts returning NaN.

PhilG4tgc commented 5 years ago

I have attached a code package hotgym_test_code.zip that reproduces the problem.

Executing hot_gym.py will run the model for 18819 steps. At step 18809, and then from step 18815 onwards, the 5-Step ahead confidence interval is NaN.

The model is identical to the standard hotgym Network API example except for also displaying the time step index.

The installed packages are numpy==1.12.1 nupic==1.0.5 nupic.bindings==1.0.6 PyYAML==3.10

It is being executed on a Windows 10 box.

rhyolight commented 5 years ago

I replicated the bug. I think it is a bug in the C++ SDR Classifier. The Python implementations did not have this issue. More details:

suzusuzu commented 5 years ago

@rhyolight please show this https://github.com/numenta/nupic.core/pull/1453