Reverse SDR Classifier?

Hi !
Do you have classifier, the output of which is SDR ?

Thanx a lot!

If you want an SDR from the TM, you can get the winner cells or predictive cells. But these SDRs are usually “decoded” by the encoder that created the input SDR.

What is your use-case for this?

We need an SDR, which will contain information about features predicted in TM and from encoder at the same time. We are going to use it as an input of SP of the next level in the hierarchy.

Is there at least a classifier, which can make classification not based on the encoder, but creating a set of new (not related to the encoder directly) features?

I don’t think you want a classifier here. If you want to get meaningful semantic SDRs from the SP/TM algorithms, you’ll want to get the winner cells from the TM. That is your SDR to pass up to the next layer.

(@scott @mrcslws correct me if I’m wrong)

The active cells are what would be passed up the hierarchy. But you probably won’t get any improved results simply by stacking SP/TM in a hierarchy.

If you are using the new TemporalMemory class, you can get the active cells with tm.getActiveCells() and if you are using the network API then you can pull out the TM class from the region with tmRegion.getSelf().getAlgorithmInstance(). These methods will be different if you’re using the other TM implementation though.

Thank you for the details.
Nevertheless, we don’t need improved results, we want to have a classification of patterns, where every prediction isn’t an element from the encoder.
Let’s say we have in our encoder some fruits properties, like color, size, and shape, and we want to see as the result apple, banana, and lemon.

So you have an encoder that is encoding semantic meaning? Meaning you have subclassed BaseEncoder? To do the decoding, you use the SDRClassifier. But you MUST implement the decoding logic in your encoder as well. I think you do this by implementing getBucketIndices, which will convert an SDR into a bucket index. ScalarEncoder has an example of this.

We use a scalar encoder, and it does encode semantic meaning, but we need another set of meaning as the result. So, we can’t use SDRClassifier, which is hardwired (correct me if I’m wrong) to use the meanings from the encoder.

I think what you are trying to do is some type of object recognition via temporal pooling. Are you interested in extracting information about the what temporal sequences are currently being recognized? NuPIC doesn’t do temporal pooling, but our current research on SMI does. However this is still experimental research code. We are publishing papers about it, but there is no concrete production implementation.

1 Like

getBucketIndices has nothing to do with SDR’s, it does not encode or decode, it just maps the input space to buckets.

It’s possible to implement decoding logic in the encoder, but not necessary. So far none of the nupic encoders have any decoding function.

The classifier does the SDR decoding into input buckets (which can be mapped back to the input space using the inverse of getBucketIndices) by means of probabilistic association, with no regards to the encoder.

1 Like

Thanks for the correction. I’ve only dealt with decoding / classification I little bit.

Thank you for the clarification.
To sum up, there isn’t, for now, any way to do classification with HTM, which is not based on input information. To solve such a problem, you have to implement your own logic.

I do think you are correct about that.