# How to set random distributed encoder in model param

**URL:** <https://discourse.numenta.org/t/how-to-set-random-distributed-encoder-in-model-param/3925>\
**Category:** NuPIC\
**Created:** [May 17, 2018, 11:50am UTC](https://discourse.numenta.org/t/how-to-set-random-distributed-encoder-in-model-param/3925 "2018-05-17T11:50:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Millan](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Millan](https://discourse.numenta.org/u/Millan)\
**Post date:** [May 17, 2018, 11:50am UTC](https://discourse.numenta.org/t/how-to-set-random-distributed-encoder-in-model-param/3925/1 "2018-05-17T11:50:00Z")

</div>

Hi All,

I am trying to predict 5 steps ahead using nupic…After swarming, the model parameter file produces scalar encoder for my input…But using this my prediction is not coming proper. So i wanted to use random distributed encoder. Please someone guide me how can i use it .

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:** [May 17, 2018, 8:06pm UTC](https://discourse.numenta.org/t/how-to-set-random-distributed-encoder-in-model-param/3925/2 "2018-05-17T20:06:47Z")

</div>

Find the `encoders` section of the model params and swap out `ScalarEncoder` with `RandomDistributedScalarEncoder`. You’ll also have to update the parameters for the constructer, which you can find [here](http://nupic.docs.numenta.org/1.0.3/api/algorithms/encoders.html#nupic.encoders.random_distributed_scalar.RandomDistributedScalarEncoder).
