# How HTM predict peaks in a simple pattern

**URL:** <https://discourse.numenta.org/t/how-htm-predict-peaks-in-a-simple-pattern/4561>\
**Category:** NuPIC\
**Created:** [September 13, 2018, 11:58am UTC](https://discourse.numenta.org/t/how-htm-predict-peaks-in-a-simple-pattern/4561 "2018-09-13T11:58:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katerina](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@Katerina](https://discourse.numenta.org/u/Katerina)\
**Post date:** [September 13, 2018, 11:58am UTC](https://discourse.numenta.org/t/how-htm-predict-peaks-in-a-simple-pattern/4561/1 "2018-09-13T11:58:47Z")

</div>

Hello there! I’m new in HTM, so I want to undersand this approach in a simple examples.I have generated simple pattern with numbers from 0 to 100 with step 1 repeated 10 times. It’s looks like saw. Then I add to this data two random peaks.

Next, I did swarm and created a predict model. But I don’t understand, how HTM predict this two peaks?

So, when I use this model for outliers prediction, this peaks isn’t labes as anomaly.

 ![%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/a/a691234b7663ae54cdf1bfdd1ee0fc4b513fe108.png)

Blue line is the data, green line is the predicted data, red crosses is the predicted outliers.

What is my mistake?

---

<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:** [September 13, 2018, 3:25pm UTC](https://discourse.numenta.org/t/how-htm-predict-peaks-in-a-simple-pattern/4561/2 "2018-09-13T15:25:33Z")

</div>

It looks like NuPIC’s predictions are not shifted for plotting. See my comments [here](https://discourse.numenta.org/t/predict-value-expect-value/2894/8?u=rhyolight) and [here](http://nupic.numenta.narkive.com/rWcuyM2P/nupic-discuss-confusion-about-shifted-predictions).

Also, NuPIC is not going to perform well on very structured input. It will do better with lots of noisy input.
