{"action":"opened","number":3197,"pull_request":{"url":"https://api.github.com/repos/numenta/nupic/pulls/3197","id":76461008,"html_url":"https://github.com/numenta/nupic/pull/3197","diff_url":"https://github.com/numenta/nupic/pull/3197.diff","patch_url":"https://github.com/numenta/nupic/pull/3197.patch","issue_url":"https://api.github.com/repos/numenta/nupic/issues/3197","number":3197,"state":"open","locked":false,"title":"Python column segment walk","user":{"login":"andrewmalta13","id":7546926,"avatar_url":"https://avatars.githubusercontent.com/u/7546926?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewmalta13","html_url":"https://github.com/andrewmalta13","followers_url":"https://api.github.com/users/andrewmalta13/followers","following_url":"https://api.github.com/users/andrewmalta13/following{/other_user}","gists_url":"https://api.github.com/users/andrewmalta13/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmalta13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmalta13/subscriptions","organizations_url":"https://api.github.com/users/andrewmalta13/orgs","repos_url":"https://api.github.com/users/andrewmalta13/repos","events_url":"https://api.github.com/users/andrewmalta13/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmalta13/received_events","type":"User","site_admin":false},"body":"fixes #3116 \r\n\r\nImplements the column segment walk described <a href=\"https://github.com/numenta/nupic.core/pull/917\"> here </a>.\r\n\r\nThe implementations are very similar but not exact as there are differences in connections.py and connections.cpp which affect the implementation. (perhaps we can discuss if we eventually want these to agree to ensure complete alignment between the implementations).\r\n\r\nSome of the differences that exist due to this discrepancy are:\r\n1. Cpp version delete segments when its last synapse is destroyed and the python version does not.\r\n2. When adding segments or synapses, if the number of created segments or synapses exceeds the parameters determining the maximum number of synapses on a segment or maximum number of segments on a cell:\r\n  i) Cpp version deletes the least recently used segments and the minimum permanence synapses to make room for a new segment/synapse.\r\n  ii) Python version ignores the parameters entirely (this does not seem right, but was in the old implementation) and creates them anyway without removing anything.\r\n3. Less critical, but the data structures used to represent segments and cells are different. CPP has SegmentOverlap struct and uses a struct to represent a segment. Python version just uses an int to index into some dicts to represent a segment.  Cpp uses a dumb Cell struct wrapper that just contains an int, where python just represents a cell by an int. (effectively the same, but a bit annoying on the cpp side to always have to do something like ```int cellindex = cell.idx;```\r\n\r\nFurthermore, this implementation does not seem to work with the old serialization methods as it does not preserve the numbering of segments.  If this is confirmed to be a result of the new algorithm, I will submit an github issue to address this, but as of right now I am not 100% certain it isn't an implementation bug.\r\n\r\nPlease Review:\r\n@mrcslws \r\n\r\n","created_at":"2016-07-06T16:24:02Z","updated_at":"2016-07-06T16:24:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/numenta/nupic/pulls/3197/commits","review_comments_url":"https://api.github.com/repos/numenta/nupic/pulls/3197/comments","review_comment_url":"https://api.github.com/repos/numenta/nupic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numenta/nupic/issues/3197/comments","statuses_url":"https://api.github.com/repos/numenta/nupic/statuses/7e9faf1cac0e2ca86545929ed8f2b13cfce9abbc","head":{"label":"andrewmalta13:python-columnSegmentWalk","ref":"python-columnSegmentWalk","sha":"7e9faf1cac0e2ca86545929ed8f2b13cfce9abbc","user":{"login":"andrewmalta13","id":7546926,"avatar_url":"https://avatars.githubusercontent.com/u/7546926?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewmalta13","html_url":"https://github.com/andrewmalta13","followers_url":"https://api.github.com/users/andrewmalta13/followers","following_url":"https://api.github.com/users/andrewmalta13/following{/other_user}","gists_url":"https://api.github.com/users/andrewmalta13/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmalta13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmalta13/subscriptions","organizations_url":"https://api.github.com/users/andrewmalta13/orgs","repos_url":"https://api.github.com/users/andrewmalta13/repos","events_url":"https://api.github.com/users/andrewmalta13/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmalta13/received_events","type":"User","site_admin":false},"repo":{"id":60789780,"name":"nupic","full_name":"andrewmalta13/nupic","owner":{"login":"andrewmalta13","id":7546926,"avatar_url":"https://avatars.githubusercontent.com/u/7546926?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewmalta13","html_url":"https://github.com/andrewmalta13","followers_url":"https://api.github.com/users/andrewmalta13/followers","following_url":"https://api.github.com/users/andrewmalta13/following{/other_user}","gists_url":"https://api.github.com/users/andrewmalta13/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmalta13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmalta13/subscriptions","organizations_url":"https://api.github.com/users/andrewmalta13/orgs","repos_url":"https://api.github.com/users/andrewmalta13/repos","events_url":"https://api.github.com/users/andrewmalta13/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmalta13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewmalta13/nupic","description":"Numenta Platform for Intelligent Computing: a brain-inspired machine intelligence platform, and biologically accurate neural network based on cortical learning algorithms.","fork":true,"url":"https://api.github.com/repos/andrewmalta13/nupic","forks_url":"https://api.github.com/repos/andrewmalta13/nupic/forks","keys_url":"https://api.github.com/repos/andrewmalta13/nupic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewmalta13/nupic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewmalta13/nupic/teams","hooks_url":"https://api.github.com/repos/andrewmalta13/nupic/hooks","issue_events_url":"https://api.github.com/repos/andrewmalta13/nupic/issues/events{/number}","events_url":"https://api.github.com/repos/andrewmalta13/nupic/events","assignees_url":"https://api.github.com/repos/andrewmalta13/nupic/assignees{/user}","branches_url":"https://api.github.com/repos/andrewmalta13/nupic/branches{/branch}","tags_url":"https://api.github.com/repos/andrewmalta13/nupic/tags","blobs_url":"https://api.github.com/repos/andrewmalta13/nupic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewmalta13/nupic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewmalta13/nupic/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewmalta13/nupic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewmalta13/nupic/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewmalta13/nupic/languages","stargazers_url":"https://api.github.com/repos/andrewmalta13/nupic/stargazers","contributors_url":"https://api.github.com/repos/andrewmalta13/nupic/contributors","subscribers_url":"https://api.github.com/repos/andrewmalta13/nupic/subscribers","subscription_url":"https://api.github.com/repos/andrewmalta13/nupic/subscription","commits_url":"https://api.github.com/repos/andrewmalta13/nupic/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewmalta13/nupic/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewmalta13/nupic/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewmalta13/nupic/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewmalta13/nupic/contents/{+path}","compare_url":"https://api.github.com/repos/andrewmalta13/nupic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewmalta13/nupic/merges","archive_url":"https://api.github.com/repos/andrewmalta13/nupic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewmalta13/nupic/downloads","issues_url":"https://api.github.com/repos/andrewmalta13/nupic/issues{/number}","pulls_url":"https://api.github.com/repos/andrewmalta13/nupic/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewmalta13/nupic/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewmalta13/nupic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewmalta13/nupic/labels{/name}","releases_url":"https://api.github.com/repos/andrewmalta13/nupic/releases{/id}","deployments_url":"https://api.github.com/repos/andrewmalta13/nupic/deployments","created_at":"2016-06-09T16:30:57Z","updated_at":"2016-06-09T16:31:01Z","pushed_at":"2016-07-06T15:43:49Z","git_url":"git://github.com/andrewmalta13/nupic.git","ssh_url":"git@github.com:andrewmalta13/nupic.git","clone_url":"https://github.com/andrewmalta13/nupic.git","svn_url":"https://github.com/andrewmalta13/nupic","homepage":"http://numenta.org/","size":140222,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"numenta:master","ref":"master","sha":"0aea2be0eee762964f8354300f74d679602b4c46","user":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"repo":{"id":9252533,"name":"nupic","full_name":"numenta/nupic","owner":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numenta/nupic","description":"Numenta Platform for Intelligent Computing: a brain-inspired machine intelligence platform, and biologically accurate neural network based on cortical learning algorithms.","fork":false,"url":"https://api.github.com/repos/numenta/nupic","forks_url":"https://api.github.com/repos/numenta/nupic/forks","keys_url":"https://api.github.com/repos/numenta/nupic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numenta/nupic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numenta/nupic/teams","hooks_url":"https://api.github.com/repos/numenta/nupic/hooks","issue_events_url":"https://api.github.com/repos/numenta/nupic/issues/events{/number}","events_url":"https://api.github.com/repos/numenta/nupic/events","assignees_url":"https://api.github.com/repos/numenta/nupic/assignees{/user}","branches_url":"https://api.github.com/repos/numenta/nupic/branches{/branch}","tags_url":"https://api.github.com/repos/numenta/nupic/tags","blobs_url":"https://api.github.com/repos/numenta/nupic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numenta/nupic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numenta/nupic/git/refs{/sha}","trees_url":"https://api.github.com/repos/numenta/nupic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numenta/nupic/statuses/{sha}","languages_url":"https://api.github.com/repos/numenta/nupic/languages","stargazers_url":"https://api.github.com/repos/numenta/nupic/stargazers","contributors_url":"https://api.github.com/repos/numenta/nupic/contributors","subscribers_url":"https://api.github.com/repos/numenta/nupic/subscribers","subscription_url":"https://api.github.com/repos/numenta/nupic/subscription","commits_url":"https://api.github.com/repos/numenta/nupic/commits{/sha}","git_commits_url":"https://api.github.com/repos/numenta/nupic/git/commits{/sha}","comments_url":"https://api.github.com/repos/numenta/nupic/comments{/number}","issue_comment_url":"https://api.github.com/repos/numenta/nupic/issues/comments{/number}","contents_url":"https://api.github.com/repos/numenta/nupic/contents/{+path}","compare_url":"https://api.github.com/repos/numenta/nupic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numenta/nupic/merges","archive_url":"https://api.github.com/repos/numenta/nupic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numenta/nupic/downloads","issues_url":"https://api.github.com/repos/numenta/nupic/issues{/number}","pulls_url":"https://api.github.com/repos/numenta/nupic/pulls{/number}","milestones_url":"https://api.github.com/repos/numenta/nupic/milestones{/number}","notifications_url":"https://api.github.com/repos/numenta/nupic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numenta/nupic/labels{/name}","releases_url":"https://api.github.com/repos/numenta/nupic/releases{/id}","deployments_url":"https://api.github.com/repos/numenta/nupic/deployments","created_at":"2013-04-05T23:14:27Z","updated_at":"2016-07-05T09:36:45Z","pushed_at":"2016-07-06T16:24:03Z","git_url":"git://github.com/numenta/nupic.git","ssh_url":"git@github.com:numenta/nupic.git","clone_url":"https://github.com/numenta/nupic.git","svn_url":"https://github.com/numenta/nupic","homepage":"http://numenta.org/","size":285178,"stargazers_count":4266,"watchers_count":4266,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1196,"mirror_url":null,"open_issues_count":486,"forks":1196,"open_issues":486,"watchers":4266,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numenta/nupic/pulls/3197"},"html":{"href":"https://github.com/numenta/nupic/pull/3197"},"issue":{"href":"https://api.github.com/repos/numenta/nupic/issues/3197"},"comments":{"href":"https://api.github.com/repos/numenta/nupic/issues/3197/comments"},"review_comments":{"href":"https://api.github.com/repos/numenta/nupic/pulls/3197/comments"},"review_comment":{"href":"https://api.github.com/repos/numenta/nupic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numenta/nupic/pulls/3197/commits"},"statuses":{"href":"https://api.github.com/repos/numenta/nupic/statuses/7e9faf1cac0e2ca86545929ed8f2b13cfce9abbc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":18,"additions":1315,"deletions":850,"changed_files":5}}
{"actor":{"display_login":"andrewmalta13"}}