Matrix after PCA is not orthogonal
Page 1 of 1

Author:  Boy1 [ Tue Feb 12, 2019 5:21 am ]
Post subject:  Matrix after PCA is not orthogonal

Hi everyone,

I want to apply PCA on my matrix. What I did is to call pcabuildbasis() function, get the eigVectors and then multiply my matrix with the eigVectors matrix. However when I check the correlation coefficient among columns after PCA, I find the last several columns are still correlated. Here is my code. Did I call pcabuildbasis() incorrectly? Or there is a bug in the PCA function itself?

int NumOfSamplePath=1000;
int nofcoeffs=417;
int i=1;

alglib::real_2d_array ptInput;
ptInput.setcontent(NumOfSamplePath, nofcoeffs - 12 * (i - 1), beta_var_value[i]);
alglib::ae_int_t info;
alglib::real_1d_array eigValues;
alglib::real_2d_array eigVectors;
alglib::pcabuildbasis(ptInput, NumOfSamplePath, nofcoeffs - 12 * (i - 1), info, eigValues, eigVectors);


Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group