matrix = N[{{1, 2}, {2, 3}, {4, 10}}]
{{1., 2.}, {2., 3.}, {4., 10.}}
res1 = PrincipalComponents[matrix, Method -> "Correlation"]
{{1.10388, 0.130549}, {0.478746, -0.170139}, {-1.58262, 0.0395904}}
res2 = PrincipalComponents[matrix, Method -> "Covariance"]
{{3.27053, 0.285293}, {1.99969, -0.335165}, {-5.27023, 0.0498715}}
res3 = PrincipalComponents[Standardize @ matrix, Method -> "Covariance"]
{{1.10388, 0.130549}, {0.478746, -0.170139}, {-1.58262, 0.0395904}}
Here, you see that res1 == res3
. My question is, how can I get res2
manually like the following:
eigenVectors = Eigenvectors @ Covariance[Standardize @ matrix];
Standardize[matrix].Transpose[eigenVectors]
{{-1.10388, 0.130549}, {-0.478746, -0.170139}, {1.58262, 0.0395904}}