numenta / htmresearch

Experimental algorithms. Unsupported.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TP Calculation of Amount of Unpredicted Input

ryanjmccall opened this issue · comments

I think there's an issue in the TP; namely, the way the fraction of unpredicted input is calculated. The current way is as follows:

numUnPredictedInput = float(len(burstingColumns.nonzero()[0]))
numPredictedInput = float(len(predictedCells))
fracUnPredicted = numUnPredictedInput/(numUnPredictedInput + numPredictedInput)

self._updatePoolingState(activeColWithPredictedInput, fracUnPredicted)

(https://github.com/numenta/nupic.research/blob/master/sensorimotor/sensorimotor/temporal_pooler.py#L473-L477)

The issue is that burstingColumns ranges from 0 to number of columns, while predictedCells ranges from 0 to number of cells. These ranges are unequal. One thought I had is to multiply numUnPredictedInput occurrences by cellsPerColumn putting everything in terms of cells.

Chetan - "Typically we see one predicted cell per column, especially since we have learn on one cell enabled in the sensorimotor temporal memory layer. So in practice, I don't think this logic will cause a big problem. I agree that it's not ideal though. I think we should really be measuring the fraction of unpredicted columns, so the total number of columns that predictedCells show up in and treat that as numPredictedInput. This will complicate the logic though, and at the moment I'm not sure it's worth it, especially since it might completely change in the near future.

I would just file an issue for now and punt on it until we discover it is causing problems."