Regarding training window in HTM based anomaly detection

I want to know how we can specify a training window in a large dataset of server logs containing CPU/memory usage. I suppose that based on the training window, HTM will learn various patterns in the dataset and based on the learnings it will classify the data point as anomaly or not.
Also, tell how we can somehow save the trained model and later use it for real time anomaly detection.

Hey @avly welcome!

Here’s the docs for the HTMPredictionModel. There’s a method called ‘disableLearning()’ which you can call on the model object at any time.

HTMPredictionModel is set as the ‘model’ value in the model params used to initialize the model. A sample params file is here:

For saving here’s another resource. I just use which has worked for me.