{"action":"opened","issue":{"url":"https://api.github.com/repos/numenta/nupic/issues/2728","labels_url":"https://api.github.com/repos/numenta/nupic/issues/2728/labels{/name}","comments_url":"https://api.github.com/repos/numenta/nupic/issues/2728/comments","events_url":"https://api.github.com/repos/numenta/nupic/issues/2728/events","html_url":"https://github.com/numenta/nupic/issues/2728","id":114896003,"number":2728,"title":"Better behavior for _initPermanence","user":{"login":"SaganBolliger","id":6234732,"avatar_url":"https://avatars.githubusercontent.com/u/6234732?v=3","gravatar_id":"","url":"https://api.github.com/users/SaganBolliger","html_url":"https://github.com/SaganBolliger","followers_url":"https://api.github.com/users/SaganBolliger/followers","following_url":"https://api.github.com/users/SaganBolliger/following{/other_user}","gists_url":"https://api.github.com/users/SaganBolliger/gists{/gist_id}","starred_url":"https://api.github.com/users/SaganBolliger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaganBolliger/subscriptions","organizations_url":"https://api.github.com/users/SaganBolliger/orgs","repos_url":"https://api.github.com/users/SaganBolliger/repos","events_url":"https://api.github.com/users/SaganBolliger/events{/privacy}","received_events_url":"https://api.github.com/users/SaganBolliger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-03T19:52:31Z","updated_at":"2015-11-03T19:52:31Z","closed_at":null,"body":"An issue brought up in discussion with @scottpurdy is that in [_initPermanence](https://github.com/numenta/nupic/blob/master/src/nupic/research/spatial_pooler.py#L1148) `connectedPct` only produces the correct number of connected synapses on average. In order to have an exact and repeatable number of connected synapses, a better approach would be to initialize an array with the desired number of 1s with 0s in the remaining places, and then shuffle the array. This would be a functional change that would require updating tests. Additionally, the nupic.core code would have to be updated for the functionality to match.\r\n\r\n@subutai @BoltzmannBrain "}}