numenta/nupic — pull request #293 by keithcom (2013-10-07 21:25:03+00:00)
Title: Add support for sparsity normalization

These changes allow a set sparsity to be declared in the constructor by setting the optional 'onbits' fields. The desired sparsity is achieved by activating or deactivating random bits in the output until the target sparsity is achieved. The random number generator is seeded with the hash of the input bitmap to ensure consistent results with the same input.