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().

2 Likes

@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.

2 Likes

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?

SOLVED
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