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.