Stop learning in Online Prediction Framework

I have a sequence like 1,2,5,4 and this sequence keeps on repeating. I am using opf to predict the next value in the sequence but I want the HTM model to stop learning at some point. How do I achieve this in Nupic?

I believe the method you’re looking for is finishLearning() found in nupic.frameworks.opf.model.

I found it in the online docs for version 0.7.0.

The function you are looking for is disableLearning().


@rhyolight Ahh, quite right. If I’m understanding the docs correctly, finishLearning() would place the model in a “permanent ‘finished learning’ mode”, which may or may not be what you want.


Thanx a lot. the disableLearning() method was what I was looking for.
Also is there any way to reset the whole model so that I can start the learning from scratch without actually exiting the program?

I have created a function called resetModel and in it I am again rebuilding the model. That way all the previous learning experiences will get deleted and the model will start learning from scratch. I guess that’s one way to do it.
> def resetModel():
> model = ModelFactory.create(MODEL_PARAMS)
> model.enableInference({“predictedField”: “futuremove”})

1 Like