Delayed Classifier with Network API


I want to create a classifier with Network API that is learning from a past state (n-x steps ago) of TM and an actual input ‘predictedField’ that is not a part of the encoding but is generated at step n, assuming n is the current step. But, it uses the current state of TM to make a prediction.

Is this even achievable using Network API? If so, any pointers will be helpful. Thanks

Seems acheivable, but you’ll need to keep a cache of the TM state in the classifier so you can do lookups. Depending on how far back you want to go, this might be very innefficient.

Thanks for your reply Matt.

So, I was thinking about this further.

I have an alternate implementation that might do exactly the same thing and is a more natural way of writing the classifier with the Network API.

If I set the prediction step as x, then for the learning in classifier, the current TM state will be matched with an input that comes x steps after it. Isn’t it so? It will learn a mapping between a TM state and an input that comes x steps after. So, a prediction from the classifier, using the current TM state, would be of an input that would come x steps after. If so, this would mean that the classifier does cache x TM states and would do exactly what I want it to do.

The second part of my problem is, setting up the classifier with an input that is not part of the encoding that is being fed to the SP-TM region hierarchy. I could not find a way to switch off an input to the sensor from being in the encoding. But I think I can setup a second sensor region that does not feed into the hierarchy but only provides actual inputs to the classifier.

Sorry about my initial confusion, yes that is my understanding as well.

You seem to be one step ahead of me. The nice thing about the Network API is that it’s very flexible.