htm.java icon indicating copy to clipboard operation
htm.java copied to clipboard

The RandomDistributedScalarEncoder needs ability to set ```numBuckets```

Open cogmission opened this issue 10 years ago • 3 comments

numBuckets needs an official Parameter in Parameters.java and it needs to be set by the Network API upon initialization.

Care must be taken to guarantee that the resolution is properly calculated and that the param is tested when absent as well.

cogmission avatar Jul 25 '16 16:07 cogmission

So will Parameters have access to the input data to calculate the min / max values required to calculate the resolution?

rhyolight avatar Jul 25 '16 17:07 rhyolight

I don't believe this is necessary. Alex mentioned that they are "auto-configured" from the numBuckets parameter... as seen here and here (numBuckets == maxBuckets, deeper in the code)

I'm not averse to having encoder params at all. We do it for the DateEncoder (due to it's need for varied configuration), so we can do it for others as well?

cogmission avatar Jul 25 '16 17:07 cogmission

For instance, the NAB assumes that the numBuckets parameter is sufficient and doesn't specify resolution specifically, however HTM.Java doesn't have this so it thinks the resolution parameter is missing and throws java.lang.AnnoyingAsHellException :-P

My fix for this was to add resolution to the NAB JSON config file, but if we were going to do it the NuPIC way, we would allow the numBuckets parameter to be picked up and usher in the configuration.

cogmission avatar Jul 25 '16 17:07 cogmission