An encoder for arbitrary objects that encodes an equality comparison between
a given input and a set of unique values. It does an equality comparison to
each specified value and encodes those booleans using a given boolean
encoding. Typically, this encoding uses a single dimension for each value,
but it supports boolean encodings of higher dimensionalities. This encoding
is sometimes refered to as a "grandmother" encoding for neural networks,
after the idea that there is a single neuron for each concept, such as your
grandmother. The encoding is called a unique encoding because if a given
input is in the set of possible values, a single true value will be encoded.
Encodes the given object into the given vector at the given starting
index by using a unique boolean encoding, where the given input value is
compared to each of the encoder's values using equality. If the input is
in the set of unique values, a single unique true boolean will be
encoded, otherwise, all of the encoded values will be false.
object - The object to encode.
vector - The vector to encode into.
startIndex - The index to start the encoding at.
public int getOutputDimensionality()
Gets the dimensionality of the vector created by this converter, which
is the number of possible values times the size of the boolean encoding.
The dimensionality of the vector created by this encoder.