numenta/nupic — pull request #828 by breznak (2014-04-18 22:06:14+00:00)
Title: Extract boosting (draft)

this is a draft of extracting some logic from spatial-pooler (and TP where applicable) -boosting,inhibition, topology- into separate packages.

my motivation is better readability of the code, much easier development and experimenting with alternative implementations (alternative boosting impl was motivation for this one), and better code (forces to define public interface to classes and fix "hacky" direct access to private fields).

So far the functionality is not changed at all, just the code is reshuffled. I'd like to have this PR reviewed first to make it simpler.

So far:

new abstract class Boosting, and one impl BoostingSimple. (Boosting does the logic of boosting we use now)

TODO if this is reviewed & merged:

1/ the same for C++
2/ iron out direct access to private fields from outer classes!
3/ break link Boosting->SP by modifying methods' params.
4/ separate boosting unittests from `spatial_pooler_tests.py`
5/ remove the "exposing methods" in SP (see TODO there)
6/ figure public interface to Boosting class (init params, public methods) - do that by designing alternative boosting mechanism.

*7/ if this is well accepted, do same for inhibition, topology