I have a set of 2D vectors presented in a n*2 matrix form.
n*2
I wish to get the 1st principal component, i.e. the vector that indicates the direction with
PCA gives only 2d vecs from 2d data.
Look at the picture in Wikipedia PCA: starting with a point cloud (dataMatrix) like that, and using matplotlib.mlab.PCA, myPCA.Wt[0] is the first PC, the long one in the picture.
matplotlib.mlab.PCA
myPCA.Wt[0]