# Question on swarm results in hotgym example

**URL:** <https://discourse.numenta.org/t/question-on-swarm-results-in-hotgym-example/5476>\
**Category:** NuPIC\
**Created:** [February 19, 2019, 12:57pm UTC](https://discourse.numenta.org/t/question-on-swarm-results-in-hotgym-example/5476 "2019-02-19T12:57:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.1](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@simon.1](https://discourse.numenta.org/u/simon.1)\
**Post date:** [February 19, 2019, 12:57pm UTC](https://discourse.numenta.org/t/question-on-swarm-results-in-hotgym-example/5476/1 "2019-02-19T12:57:07Z")

</div>

When I run swarm.py on the hotgym prediction example I get a model that seems to work quite well. However when I look at the model parameters in that the swarm produces in rec\_center\_hourly\_model\_params.py I am surprised that it does not seem to encode the date in a way which includes whether it is a weekend or not. What I get is:

```auto
'sensorParams': { 'encoders': 
  { '_classifierInput': 
    { 'classifierOnly': True,
      'clipInput': True,
      'fieldname': 'kw_energy_consumption',
      'maxval': 53.0,
      'minval': 0.0,
      'n': 362,
      'name': '_classifierInput',
      'type': 'ScalarEncoder',
      'w': 21},
    u'kw_energy_consumption': 
     { 'clipInput': True,
       'fieldname': 'kw_energy_consumption',
       'maxval': 53.0,
       'minval': 0.0,
       'n': 271,
       'name': 'kw_energy_consumption',
       'type': 'ScalarEncoder',
       'w': 21},
    u'timestamp_dayOfWeek': None,
    u'timestamp_timeOfDay': 
     { 'fieldname': 'timestamp',
       'name': 'timestamp',
       'timeOfDay': ( 21, 8.421340604599116),
       'type': 'DateEncoder'},
    u'timestamp_weekend': None
   },
   'sensorAutoReset': None,
   'verbosity': 0},

```

Am I misinterpreting this – is this what you expect?

---

<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:** [February 19, 2019, 3:00pm UTC](https://discourse.numenta.org/t/question-on-swarm-results-in-hotgym-example/5476/2 "2019-02-19T15:00:13Z")

</div>

You are interpreting this right. The swarm finds the best parameters it can find within limits. We have found it’s a good tool to use to help narrow down the search space, but sometimes it missing things. A “medium” swarm for example, will use many less permutations of encoder parameters and might not find that a field should be encoded because the parameter search space is too small.

My advice to you is if you see a weekend vs weekday pattern, include the weekend encoder. Your brains knows better than the swarm.
