nupic-legacy icon indicating copy to clipboard operation
nupic-legacy copied to clipboard

Proposal: SP potentialRadius should default to -1

Open mrcslws opened this issue 8 years ago • 1 comments

Proposal:

  • In the SpatialPooler, support potentialRadius=-1. This value would disable any topology relationship between columns and inputs. This would save everyone from having to figure out their input width and setting potentialRadius=inputWidth.
  • Change the default potentialRadius value from 16 to -1.
  • Remove the code in the SPRegion which is already forcing everyone into this default. Respect people's model parameters -- allow them to set the potentialRadius when using the Network API.

Who this would break:

  • Anybody using the raw SpatialPooler who is depending on the default value of 16.

Alternate fixes:

  • When globalInhibition is true, ignore the potentialRadius.
    • This would also work, but some people might want to experiment with using a potential radius with global inhibition. It adds some structure to the randomness.
    • This would be much more dramatic breaking change than changing the default value of potentialRadius.

Related links:

  • Old issue: "SPRegion should respect potentialRadius model parameter" https://github.com/numenta/nupic/issues/839
  • A blog post about the time I got bit by this: http://mrcslws.com/blocks/2016/03/31/column-sdr-not-random-enough.html
  • This was also the culprit of a very long htm.java debugging spree: https://github.com/numenta/NAB/pull/237/commits/cc2855e4e113ca738dad789bf9273ccea6798c4e

mrcslws avatar Sep 28 '16 16:09 mrcslws

FYI, I already implemented this in HTM.Java and it works very well. If the potentialRadius > -1 then the NAPI lets the configured value stand; if its -1, then it is set automatically in the background to be the inputWidth. I think this is very convenient...

cogmission avatar Oct 14 '16 22:10 cogmission