Hi Jos, We do have a CategoryEncoder, which actually just uses the ScalarEncoder in exactly the way you describe above, reserving the "0" for unknown strings.
https://github.com/numenta/nupic/blob/master/nupic/encoders/category.py#L39 --------- Matt Taylor OS Community Flag-Bearer Numenta On Mon, Jun 15, 2015 at 8:53 AM, Jos Theelen <[email protected]> wrote: > Suppose I have some variable that I want to use as an input for a > SpatialPooler. The variable can be one out of 20 categories, while the > categories have no connection to each other. In that case it seems > reasonable to take 20 bits and give each category one bit. > > But sometimes there are records, where the category is not known or not > available. What would be a good solution? Take 21 bits and take “unknown” as > a different and new category? Or take 20 bits and put them all on 0? > > Jos Theelen > >
