# Multistep Prediction

**URL:** <https://discourse.numenta.org/t/multistep-prediction/2475>\
**Category:** NuPIC\
**Created:** [June 30, 2017, 7:07am UTC](https://discourse.numenta.org/t/multistep-prediction/2475 "2017-06-30T07:07:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikash0837](https://avatars.discourse-cdn.com/v4/letter/v/8dc957/32.png) [@vikash0837](https://discourse.numenta.org/u/vikash0837)\
**Post date:** [June 30, 2017, 7:07am UTC](https://discourse.numenta.org/t/multistep-prediction/2475/1 "2017-06-30T07:07:41Z")

</div>

Hi,  
I am trying to do 3 step prediction. I am doing the swarming on a dataset using the code "python $NUPIC/scripts/run\_swarm.py multi1\_search\_def.json --overwrite --maxWorkers 5 "and and then i am running “python $NUPIC/scripts/run\_opf\_experiment.py model\_0” . I am getting the output in the file DefaultTask.NontemporalMultiStep.predictionLog.csv. Below is the attached record

![](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/4/4894c6ab21f0dab2c512dbb827990d28c89a6e0d.png)

multiStepBestPredictions.actual multiStepBestPredictions.3  
192839 None  
202422 None  
207377 None  
212129 192839  
212319 192839  
213976 207377  
215678 212129  
215897 212319  
216162 213976  
218333 215678  
218404 215897  
219004 216162  
After looking at the prediction value it seems that it is predicting 1st actual value after three steps. Ideally predicted value should be the future value and not the the value from past. Could you please explain how this prediction could be useful. Ideally 1st predicted value should be close to the 4th actual value,but it doesn’t seem to be the case here. It seems that actual value is getting sifted down in predicted column by 3.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [July 1, 2017, 8:43pm UTC](https://discourse.numenta.org/t/multistep-prediction/2475/2 "2017-07-01T20:43:40Z")

</div>

How many rows of input data has the model seen in this example?

---

<div class="post-metadata">

**Author:** ![vikash0837](https://avatars.discourse-cdn.com/v4/letter/v/8dc957/32.png) [@vikash0837](https://discourse.numenta.org/u/vikash0837)\
**Post date:** [July 4, 2017, 6:48am UTC](https://discourse.numenta.org/t/multistep-prediction/2475/3 "2017-07-04T06:48:27Z")

</div>

Hi @rhyolight,  
Total number of rows are 206. I believe there will be some minimum number of rows required for model in order to produce stable output. If i am right then can you please tell me that what should be that number?

Thanks

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [July 4, 2017, 2:41pm UTC](https://discourse.numenta.org/t/multistep-prediction/2475/4 "2017-07-04T14:41:38Z")

</div>

You should feed the model a few thousand rows of data before it will put up patterns in the data. I’m not surprised that it’s not predicting well yet. Based on the data you pasted above, the plot of actual values looks like this:

 ![](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/5/57ce863953aaec6ab61880e817efe0c804d79a8b.png)

What does the plot look like with all 200+ rows? Are there patterns there there you can discern?

---

<div class="post-metadata">

**Author:** ![vikash0837](https://avatars.discourse-cdn.com/v4/letter/v/8dc957/32.png) [@vikash0837](https://discourse.numenta.org/u/vikash0837)\
**Post date:** [July 5, 2017, 8:00am UTC](https://discourse.numenta.org/t/multistep-prediction/2475/5 "2017-07-05T08:00:14Z")

</div>

Hi @rhyolight ,  
thanks a lot for the clarification. Now i am able to take informed decision based on your response. Earlier I wasn’t able to analyse my result.
