# What is the attribute of "subdimensions"?

There is subdimensions attribute in nengo.State().
I know the attribute means “Size of the individual ensembles making up the vector. Must divide dimensions evenly” in Nengo docs, and determines the number of neurons.

For example, the vector dimensions is 64, subdimensions=16, and neurons_per_dimensions=50. Then, how many ensembles are present? Is it 16?
And for example, the vector dimensions is 4, subdimensions=1, and neurons_per_dimensions=50.
And then, are the abilitys to represent vectors in two cases the same?

If vector dimensions makes larger, should I make subdimensions attribute larger?

Hello

There would be 4 ensembles ($\frac{64}{16} = 4$). These ensembles would represent the range of dimensions [0, 15], [16, 31], [32, 47], and [48, 63], respectively (note the ranges are inclusive, and using zero-based indices). There are 50 neurons per dimension, which makes for a total of 3200 neurons representing 64 dimensions (combined).

In this case, you still have 4 ensembles, but each is one-dimensional. This makes for a total of 200 neurons, representing 4 dimensions combined.

Sort of… since both are using the same number of neurons per dimension. However, it’s a bit hard to compare, since one is representing 64 dimensions and the other is representing 4. In the first case, the encoding is split up into chunks of 16-dimensional vectors, while the second case encodes a series of scalars. So, the real answer is that the representational abilities are different, and this comes down to subtle differences in how the vectors are encoded.

Typically we keep the subdimensions fixed, while increasing the n_neurons to achieve required accuracy, and changing dimensions according to the vocabulary. A larger dimensional space makes it easier to generate random vectors that are dissimilar to each other, and thus won’t be as easily confused with each other, but at the expense of requiring many more neurons for the job.