Dear All,
i am working on NUPIC.i am having minute data.
i want to forecast 30 future points. which parameters
should i change in Hot Gym Prediction Example to get those values ?
Thanks,
kr_varma
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.
Thank you @sheiser1 for your help. According Hot Gym Example Predicting Multiple steps into the future (Predicting multiple steps into the future) .
We are swarming for only One Step. Then how should i swarm for 30 steps in Nupic ?
That can be done by changing the âpredictionStepsâ value in the swarm.py file from 1 to 30:
I would also point out that 30 steps is inherently much more difficult to get accurately that the usual 1 step of course, so I do hope you have a good amount of data and that there are some pretty clear patterns, which I think would be needed for this to work well. In case it doesnât I might try reducing the time granularity, for example if youâre in 1-hour timesteps then it would take 30 steps to get to 30 hours, but if you go down to 6-hour timesteps then you could get to 30 hours ahead in just 5 timesteps. Just something to consider if your results are what you hoped, though give that a shot and let us know how it works out.