Hi and thanks for your answer!
No, I’m not using predictions (yet). Anyway, I watched the videos and what I would like to do is what is said in the first video at 52:43-53:01
I’m working using words as inputs, which become (sparse) binary arrays using the encoder, which in turn are converted into SDRs. I want to modify one SDR somehow (mostly creating a new SDR by ORing several SDRs, using masks…) and then I would like to get the input(s) (the binary array) that would generate such an SDR. As I see it, I would like to get all the input bits which have a connected sinapsis with any of the active columns (represented by the SDR). If possible, I would like to get the connections and their precedences.
I’m doing this because, As I have a (big but) finite list of possible inputs, I would like to somehow rank the inputs (which are words converted into bit arrays), listing first the word that is “closest” to the given SDR, then the second, and so on…
I’m now trying to use a method of the SpatialPooler class that might help: getConnectedSynapses.
This is mostly what I want to do. I was trying to make the HTM model work “backwards” from the SDR to the input. So one possibility (unless there is anything better) could be checking all the active columns in the SDR, and taking all the input bits with a connected synapse to any of those active columns.
However, I don’t know how to use this method, since the result is an ndarray of floats (I was expecting booleans). Most of the values are 0.0, but then, most of the non-zero values are values extremely close to 0.0, such as 4.94e-324.
How should I use the getConnectedSynapses?