How to forecaste of sensor values by using NUPIC?

Hi @rakeshvarmak, I think this thread called ‘predicting multiple steps into the future’ will help you:

It seems that within in the model params file the ‘clParams’ dict needs to be changed. The ‘steps’ list should include all points into the future you want to predict, so if you want the next 30 you should list all values 1 through 30 (as I start to do below)

‘clParams’: {

‘steps’: ‘1,2,3,4,5,6’,

},

It also seems that you’ll have to do add to the run.py file. In the demo the prediction is extracted and then written to the output with these lines:

prediction = result.inferences[“multiStepBestPredictions”][1]
output.write([timestamp], [consumption], [prediction])

I believe that you’ll have to make more ‘prediction =’ lines to get and then write the multiple predictions, something like:

prediction2 = result.inferences[“multiStepBestPredictions”][2]
prediction3 = result.inferences[“multiStepBestPredictions”][3]
prediction4 = result.inferences[“multiStepBestPredictions”][4]
prediction5 = result.inferences[“multiStepBestPredictions”][5]

and then write them all:

output.write([timestamp], [consumption], [prediction],[prediction2],[prediction3],[prediction4],[prediction5])

I’d say give this a try with just a couple steps ahead, and if it works then you can expand it out to all 30 steps. Hopefully someone (such as @rhyolight ) can verify this but I’d say give it a shot and see if it works, then let us know if you run into problems.