How to reduce the dimensionality of a vector


#1

Hello.

So let’s say I have a vector with n dimensions represented in an ensemble (let’s call it A). I wish to connect this ensemble A to another ensemble B with m dimension with m < n. I want the vector represented in B to be a linear combination of the vector in A. How would I do this?

In the 10th tutorial called transforms, I see how you can do it with transform. However, I wish to for the transform to be more plastic (I wish to train that connection using nengo_dl)


#2

When using nengo_dl you set up the structure of your network in the same way as normal (e.g., using the ideas in the tutorial you refer to). That defines the starting point of the training, so you would set the transform to whatever you want the initial linear transformation to be. Then you can apply the nengo_dl training, and it will optimize that transformation (and other parameters in the network) based on the training data you specify.


#3

So to make sure I understand correctly, let’s say I have a connection defined like so:

nengo.Connection(c, d2, transform=[[2, -1, -1]])

When I run train method from the simulator, the values written in the definition would get changed, right?


#4

Yep, that’s correct.


#5

Thank you very much.


#6

Note that you can use the Johnson–Lindenstrauss lemma to obtain a good initial choice of transform. You can try this, as well as two other similar techniques, using sklearn.random_projection. Similarly, if you have some sample data, you can take its first $m$ principal components using SVD as your transform.