# Anomaly scores relation with "windowSize" parameter in "movingAverage" class

**URL:** <https://discourse.numenta.org/t/anomaly-scores-relation-with-windowsize-parameter-in-movingaverage-class/1892>\
**Category:** NuPIC\
**Created:** [February 9, 2017, 10:17am UTC](https://discourse.numenta.org/t/anomaly-scores-relation-with-windowsize-parameter-in-movingaverage-class/1892 "2017-02-09T10:17:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishnu\_Nair](https://avatars.discourse-cdn.com/v4/letter/v/838e76/32.png) [@Vishnu\_Nair](https://discourse.numenta.org/u/Vishnu_Nair)\
**Post date:** [February 9, 2017, 10:17am UTC](https://discourse.numenta.org/t/anomaly-scores-relation-with-windowsize-parameter-in-movingaverage-class/1892/1 "2017-02-09T10:17:25Z")

</div>

Hi All,

I have a doubt that if we give some value to the parameter **“windowSize”** in **“movingAverage”** class from **[anomly.py](http://anomly.py)** how does it effect the calculation of next anomaly score, if my understanding is correct anomaly score is calculated on temporal level as difference between the predicted columns and active columns from spatial pooler, So how does the calculated moving average affect the anomaly score at temporal level. Does it helps to pacify the anomaly score in any ways. If yes how is it different from anomaly likelihood.

will be gratefull for the inputs

Thanks.

---

<div class="post-metadata">

**Author:** ![subutai](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/subutai/32/106_2.png) [@subutai](https://discourse.numenta.org/u/subutai)\
**Post date:** [February 9, 2017, 10:02pm UTC](https://discourse.numenta.org/t/anomaly-scores-relation-with-windowsize-parameter-in-movingaverage-class/1892/2 "2017-02-09T22:02:49Z")

</div>

windowSize and moving averages are only used as part of the anomaly likelihood calculation. This is done after the anomaly score is computed. Details are in this paper here (see section on “Computing Anomaly Likelihood”):

[https://arxiv.org/abs/1607.02480](https://arxiv.org/abs/1607.02480)
