# Encoding Data for HTM Systems

**URL:** <https://discourse.numenta.org/t/encoding-data-for-htm-systems/400>\
**Category:** Related Papers\
**Created:** [May 16, 2016, 2:58pm UTC](https://discourse.numenta.org/t/encoding-data-for-htm-systems/400 "2016-05-16T14:58:30Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![sheiser1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/sheiser1/32/766_2.png) [@sheiser1](https://discourse.numenta.org/u/sheiser1)\
**Post date:** [August 29, 2019, 7:28pm UTC](https://discourse.numenta.org/t/encoding-data-for-htm-systems/400/21 "2019-08-29T19:28:02Z")

</div>

> [@helena\_Thielen](#):
>
> Wouldn’t it be the case, that I have the first 10 Bits on for the encoding of 0 and would move these 10 on bits through the array according to that?

Correct. For instance if you had _minVal_ = 0; _maxVal_ = 100; _N_ = 20; _W_ = 5:

input = 0 ------\> 11111000000000000000  
input = 100 —\> 00000000000000011111  
input = 50 -----\> 00000001111100000000  
input = 30 -----\> 00001111100000000000  
input = 70 -----\> 00000000001111100000

All encodings need to have the same number (_W_) on-bits, the same inputs should always produce the same encodings, and inputs which are qualitatively closer should have more overlapping encodings.

---

<div class="post-metadata">

**Author:** ![helena\_Thielen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/helena_thielen/32/4343_2.png) [@helena\_Thielen](https://discourse.numenta.org/u/helena_Thielen)\
**Post date:** [September 2, 2019, 7:58am UTC](https://discourse.numenta.org/t/encoding-data-for-htm-systems/400/22 "2019-09-02T07:58:50Z")

</div>

Ok Thank you all a lot.  
I just wanted to be sure, that I understood everything correctly =)

---

<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 3, 2019, 3:53pm UTC](https://discourse.numenta.org/t/encoding-data-for-htm-systems/400/23 "2019-09-03T15:53:43Z")

</div>

Helena, there are lots of ways you could devise to encode scalar numbers. I have examples like this called “BoundedScalarEncoder” and “ScalarEncoder” behind the [visualizations here](https://building-htm-systems.herokuapp.com/encoding-numbers) (which is a prototype and probably won’t be at that URL forever).

---

<div class="post-metadata">

**Author:** ![helena\_Thielen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/helena_thielen/32/4343_2.png) [@helena\_Thielen](https://discourse.numenta.org/u/helena_Thielen)\
**Post date:** [September 4, 2019, 2:28pm UTC](https://discourse.numenta.org/t/encoding-data-for-htm-systems/400/24 "2019-09-04T14:28:39Z")

</div>

cool thanks a lot guys =)

---

<div class="post-metadata">

**Author:** ![flajann2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/flajann2/32/4493_2.png) [@flajann2](https://discourse.numenta.org/u/flajann2)\
**Post date:** [September 11, 2019, 5:55pm UTC](https://discourse.numenta.org/t/encoding-data-for-htm-systems/400/25 "2019-09-11T17:55:15Z")

</div>

I wonder if it would make more sense to do a recursive tessellation with triangles. Then, your coordinates would be a series of numbers, each number representing the next recursive subdivision. Should encode a lot better than using the typical geodetic coordinates.

[Previous page](https://discourse.numenta.org/t/encoding-data-for-htm-systems/400.md?page=1)
