How the model get updated in a streaming style-data?

Hello All,
I am new to NUPIC. I have following questions:

  1. In hotgym anomaly detection example, it gives the model_params.py. If there is no this file, the only way to get this is to run swarm? Is there any code for default_params.py ? So that we can skip swarm?

  2. In the hotgym prediction example, it gives the prediction result with model-params(after running swarm). The question is that after prediction, does it update the model ( which means the model-params.py) automatically? if not, do we need to rerun swarm to update the model up to current data point? Or of it does update the model, is it in model-parma.py or somewhere else?

Best Wishes,

There are default param values for the hotgym anomaly example which doesn’t swarm. If you go into the ‘anomaly’ folder instead of the ‘prediction’ folder within the ‘hotgym’ folder there will be a default modlel params file there. You’d just need to go into it and and make sure that the ‘predicted field’, ‘minval’, ‘maxval’ and encoders match with the data file you’re feeding in. If you have a timestamp column make sure its in the right format and the params file should be looking for it.

For the second question the model params file is not updated as learning progresses, no. Swarming is done beforehand to set the parameter values for learning. The NuPIC model itself is updated throughout learning of course, but the params that are used to construct that model aren’t. It may be worth running the swarm on your (by running ‘swarm_description.py’ and then ‘swarm.py’) just to see what parameters it comes up with, and how close they are to the default params within the default params file used for anomaly detection.

– Sam

Please read:

Sam is right about the 2nd question. Params are just used to instantiate a model, and are not changed during the lifespan of the model (unless you do it programmatically, and some params even then cannot be updated).