I belive it would be useful to have a method in TPrincipal which gives eigenvector values for a desired component, something like:
TVectorD GetEigenVector (int eigenVectorNumber)
At the end one of the most important results of principal component analysis is the first few eigenvectors…
Or maybe there is some trivial method to get this?
There is a method TPrincipal::GetEigenVectors() that you can use it. It returns a Matrix with the eigenvectors as column in the matrix. If you want to get the i-th eigenvector as a Vector you can do:
TVectorD v(numberOfVariables); v = TMatrixDColumn_const(*p.GetEigenVectors(),i);
Could you suggest what shall I import to python in order to be able to execute this line:
v = TMatrixDColumn_const(principal.GetEigenVectors(),0)