{"action":"created","issue":{"url":"https://api.github.com/repos/numenta/nupic/issues/2620","labels_url":"https://api.github.com/repos/numenta/nupic/issues/2620/labels{/name}","comments_url":"https://api.github.com/repos/numenta/nupic/issues/2620/comments","events_url":"https://api.github.com/repos/numenta/nupic/issues/2620/events","html_url":"https://github.com/numenta/nupic/pull/2620","id":109013266,"number":2620,"title":"[RFC] SpatialPooler: extract boosting to a separate file, \"interface\"","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/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/numenta/nupic/labels/status:ready","name":"status:ready","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-09-30T04:45:09Z","updated_at":"2015-10-08T21:10:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/numenta/nupic/pulls/2620","html_url":"https://github.com/numenta/nupic/pull/2620","diff_url":"https://github.com/numenta/nupic/pull/2620.diff","patch_url":"https://github.com/numenta/nupic/pull/2620.patch"},"body":"This PR is a request for an early review/comments. \r\n\r\nAddresses boosting in the SpatialPooler, and tries to put all the boosting related logic into one file. The `Boosting` file is not stand-alone and SP is expected to extend from it. This abstract class-like approach allows for a very smooth separation/integration of the Boosting and SP classes. \r\n\r\nIt's only change and improvement is that it hides all the `update*DutyCycles*` logic from SP. \r\n\r\nFixes: #824 "},"comment":{"url":"https://api.github.com/repos/numenta/nupic/issues/comments/146686162","html_url":"https://github.com/numenta/nupic/pull/2620#issuecomment-146686162","issue_url":"https://api.github.com/repos/numenta/nupic/issues/2620","id":146686162,"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},"created_at":"2015-10-08T21:10:45Z","updated_at":"2015-10-08T21:10:45Z","body":"> For now, I think this is the best way to separate out the boosting logic.\nNow that I think about it, it doesn't make sense for boosting logic to be\nin a base class that SP inherits from.\n\nWhen SP inherits from Boosting, some things are hackily easier: the\ngetters/setters for associated boosting variables can be in the boosting\nfile, while they stay in fact SP's methods. Then there's\n`getNearestNeighbors()` which is shared for boosting & inhibition. Simalar\nis for variables like `_iterationNum` or serialization.\n\n> However, aren't there clients of SP that call functions like\ngetBoostFactors?\n\nI think not, so far I've found it's only SP related.\n\n> If Boosting was an instance member of SP, would we need to implement\nthose functions in SP and call out to the Boosting instance member?\n\nI;m not sure what you mean here, eg. the getters would have to change to\n`getSome(): return self.boost._some`;\n\n\nAll in all, I'm changing my mind here a bit and I'd vote for keeping the\ninheritance approach for now as the least invasive. And we can open issue\nfor the \"is a part of\" way.\n\n\nThank you for review @chetan51 and let me know what you think?\n"}}