0

I need to clarify the example from here: https://github.com/numenta/nupic/wiki/Encoders

 1 becomes 111000000000
 7 becomes 111000000000
15 becomes 011100000000
36 becomes 000111000000

Do 1, 7, 15, 36 values are connected with values in the rows (w) or they are just indices/numbers in the input flow? If they are why then the set of 1 is equal to the set of 7?

srgg6701
  • 1,878
  • 6
  • 23
  • 37

1 Answers1

2

I'm not sure I understand your question, but you have to think of the buckets the ScalarEncoder is using. If n is 12 (number of bits) and w is 3 (size of bucket) as in this example, it makes sense that numbers close to each other like 1 and 7 will be put into the same bucket. In this case, there only seems to be 10 buckets available:

111000000000
011100000000
001110000000
000111000000
000011100000
000001110000
000000111000
000000011100
000000001110
000000000111

So any value between 1-10 will all be represented in the same bucket (111000000000).

If you increased the size of the n to 100 and moved w to 1, every number from 1-100 would have its own bucket.

1:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 

2:

0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 

3:

0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 

4:

0001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 

etc.

Matthew Taylor
  • 3,911
  • 4
  • 29
  • 33
  • Just to clarify: 1, 7, 15 and 36 are the scalar values being encoded. The parameters n and w are "total bits" and "width of on-bits", 12 and 3 respectively in your question. – Fergal Byrne Mar 31 '14 at 08:03
  • Fergal, probably my question came from not the right place. So, I'll try to go one step back. Does the phrase "scalar values being encoded" mean decimal values ​​converted to binary, right? If not how exatly they are being encoded? – srgg6701 Mar 31 '14 at 19:11