# Swarm description for hot gym anomaly example?

**URL:** <https://discourse.numenta.org/t/swarm-description-for-hot-gym-anomaly-example/1259>\
**Category:** NuPIC\
**Tags:** swarming, anomaly-detection\
**Created:** [August 19, 2016, 4:53pm UTC](https://discourse.numenta.org/t/swarm-description-for-hot-gym-anomaly-example/1259 "2016-08-19T16:53:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snaredrum](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/snaredrum/32/857_2.png) [@snaredrum](https://discourse.numenta.org/u/snaredrum)\
**Post date:** [August 19, 2016, 4:53pm UTC](https://discourse.numenta.org/t/swarm-description-for-hot-gym-anomaly-example/1259/1 "2016-08-19T16:53:39Z")

</div>

Hi!  
I’m wondering if it would be possible to make the swarm description for the one hot gym anomaly tutorial available on github? When I use model parameters which I have produced myself, doing my own swarming, I’m unable to get the nice anomaly scores and anomaly likelihoods which result if I use the model parameters in model\_params/rec\_center\_hourly\_model\_params.py.  
When I run swarming I used swarm\_description.py from the prediction tutorial, except that I changed “TemporalMultiStep” to “TemporalAnomaly”. I also set “iterationCount” to -1 and “swarmSize” to “large”.  
/Christian

---

<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:** [August 19, 2016, 4:56pm UTC](https://discourse.numenta.org/t/swarm-description-for-hot-gym-anomaly-example/1259/2 "2016-08-19T16:56:54Z")

</div>

There was no swarm for the hot gym anomaly example. I just re-used the model params from the prediction example. The first few minutes of this video explains it:

---

<div class="post-metadata">

**Author:** ![snaredrum](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/snaredrum/32/857_2.png) [@snaredrum](https://discourse.numenta.org/u/snaredrum)\
**Post date:** [August 19, 2016, 6:25pm UTC](https://discourse.numenta.org/t/swarm-description-for-hot-gym-anomaly-example/1259/3 "2016-08-19T18:25:30Z")

</div>

Thank you Matt for your quick reply! My response was less quick since I squeezed in a large swarming in between. Finally I succeeded with the anomaly scores, and I learned something: the swarming produces a better model if I set “inferenceType”: “TemporalMultiStep”, than if I set “inferenceType”: “TemporalAnomaly” (in swarm\_description.py). Isn’t that a bit odd? After all I used the model for anomaly calculation.

---

<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:** [August 19, 2016, 6:34pm UTC](https://discourse.numenta.org/t/swarm-description-for-hot-gym-anomaly-example/1259/4 "2016-08-19T18:34:01Z")

</div>

The swarming process is **only** looking for parameters that improve the quality of predictions on the `predictedField`. There is no way to swarm to optimize for anomaly detection. I am surprised the swarm even worked with `inferenceType` = `TemporalAnomaly`!
