Solved – Reverse PCA with nonsquare matrix

I am working with PCA to do dimensionality reduction to a set of data.

I have 1600 data points with 36 variables and I want to have a matrix with a new data set with 6 principal components. I managed to do it in matlab, so I have:

xtrain (normalized) <1600x36> 

and I write:

coeff=pca(xtrain,'NumComponents',6)  

which gives me a <36×6> matrix

So far so good. Now I want to know how to reverse the process. If I'm given a data set of how do I use the coeff matrix to pass it to a "n x 36" representation?

I would like to do this in matlab but a simple explanation can help me.

Rather than using PCA, you might want to look into using an autoencoder if reconstructing the data is necessary. Autoencoders are basically neural networks that can do dimensionality reduction, and if necessary, "decode" the original encoding. The decoded data will still be corrupted, but in all likelihood it will be better than trying to reconstruct data from PCA.

http://deeplearning.net/tutorial/dA.html

Similar Posts:

Rate this post

Leave a Comment