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
Similar question here: Principal component analysis in Python
Or you could have a look at scikits learn: http://scikit-learn.org/0.13/modules/generated/sklearn.decomposition.PCA.html