{"action":"created","issue":{"url":"https://api.github.com/repos/numenta/nupic/issues/1675","labels_url":"https://api.github.com/repos/numenta/nupic/issues/1675/labels{/name}","comments_url":"https://api.github.com/repos/numenta/nupic/issues/1675/comments","events_url":"https://api.github.com/repos/numenta/nupic/issues/1675/events","html_url":"https://github.com/numenta/nupic/pull/1675","id":53158148,"number":1675,"title":"make RDSE the default encoder for scalars","user":{"login":"breznak","id":2166111,"avatar_url":"https://avatars.githubusercontent.com/u/2166111?v=3","gravatar_id":"","url":"https://api.github.com/users/breznak","html_url":"https://github.com/breznak","followers_url":"https://api.github.com/users/breznak/followers","following_url":"https://api.github.com/users/breznak/following{/other_user}","gists_url":"https://api.github.com/users/breznak/gists{/gist_id}","starred_url":"https://api.github.com/users/breznak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breznak/subscriptions","organizations_url":"https://api.github.com/users/breznak/orgs","repos_url":"https://api.github.com/users/breznak/repos","events_url":"https://api.github.com/users/breznak/events{/privacy}","received_events_url":"https://api.github.com/users/breznak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/numenta/nupic/labels/encoder","name":"encoder","color":"bfdadc"},{"url":"https://api.github.com/repos/numenta/nupic/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-12-31T00:09:42Z","updated_at":"2015-01-08T19:11:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/numenta/nupic/pulls/1675","html_url":"https://github.com/numenta/nupic/pull/1675","diff_url":"https://github.com/numenta/nupic/pull/1675.diff","patch_url":"https://github.com/numenta/nupic/pull/1675.patch"},"body":"aims to transform (most of) encoders that use SimpleScalarEncoder internally to use RDSE instead.\r\n\r\nToday's `ScalarEncoder` is renamed to `SimpleScalarEncoder`.\r\n\r\nTODO:\r\n- [ ] what to do about all the tests, that fail due to the different inner-workings of RDSE/(Simple)ScalarEncoder ? \r\n- [x] handle w,n params from SimpleScalar->RDSE init() -- resolution: do not create compatibility class\r\n- [ ] set offset param from minval,maxval in RDSE init()\r\n- [ ] fix tests\r\n\r\nFixes: #1669 "},"comment":{"url":"https://api.github.com/repos/numenta/nupic/issues/comments/69231555","html_url":"https://github.com/numenta/nupic/pull/1675#issuecomment-69231555","issue_url":"https://api.github.com/repos/numenta/nupic/issues/1675","id":69231555,"user":{"login":"scottpurdy","id":239726,"avatar_url":"https://avatars.githubusercontent.com/u/239726?v=3","gravatar_id":"","url":"https://api.github.com/users/scottpurdy","html_url":"https://github.com/scottpurdy","followers_url":"https://api.github.com/users/scottpurdy/followers","following_url":"https://api.github.com/users/scottpurdy/following{/other_user}","gists_url":"https://api.github.com/users/scottpurdy/gists{/gist_id}","starred_url":"https://api.github.com/users/scottpurdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottpurdy/subscriptions","organizations_url":"https://api.github.com/users/scottpurdy/orgs","repos_url":"https://api.github.com/users/scottpurdy/repos","events_url":"https://api.github.com/users/scottpurdy/events{/privacy}","received_events_url":"https://api.github.com/users/scottpurdy/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T19:11:33Z","updated_at":"2015-01-08T19:11:33Z","body":"@breznak -\r\n\r\n- `import RandomDistributedScalarEncoder as ScalarEncoder` seems confusing to me but you could use a short abbreviation like `RDSE`\r\n- which tests are you worried about? The tests for ScalarEncoder and RandomDistributedScalarEncoder don't need to be changed, right?\r\n- My understanding from [the documentation](https://github.com/numenta/nupic/blob/9dc7548bfd241eec6cba0ea6e4b7b860f801f60d/nupic/encoders/random_distributed_scalar.py#L79) is that each bucket in RDSE represents a value range equal to `resolution`. The value range for buckets in the ScalarEncoder is `(maxVal-minVal)/(n-w+1)`. So give a ScalarEncoder min, max, n, and w, the RDSE resolution can be computed as `resolution=(maxVal-minVal)/(n-w+1)`."}}