forum.alglib.net
http://forum.alglib.net/

Dimensional reduction using PCA
http://forum.alglib.net/viewtopic.php?f=2&t=533
Page 1 of 1

Author:  mortaeus [ Mon Feb 06, 2012 3:02 am ]
Post subject:  Dimensional reduction using PCA

I have managed to find the orthogonal basis vectors using PCA (even an idiot like me can plug values into a function). But now I face the problem of my limited experience with data analysis. I have two questions:
  • The basis vectors that the pcabuildbasis method returns is equal in dimension to the original data set, I assume that one chooses the top ones that maximise variance?
  • Armed with these basis vectors representing a space of reduced dimension, how do I project the original data onto this lower dimensional space? All projections I am familiar with are between spaces of equal dimension.
Can anyone help me?

Thanks in advance for any help!!

Author:  mortaeus [ Mon Feb 06, 2012 3:15 am ]
Post subject:  Re: Dimensional reduction using PCA

OK, I think I might have this myself actually, and it is really simple.

Say you have a point X which is of dimension n, and m < n basis vectors that are the columns of a matrix m x n matrix B = {C1, C2, ... Cm}. To project X onto B you simply calculate transpose(X) x B.

Am I right?

Author:  Sergey.Bochkanov [ Tue Feb 07, 2012 5:21 am ]
Post subject:  Re: Dimensional reduction using PCA

Yes, you are right, but only when C1...Cm are orthonormal (mutually orthogonal and have unit length). Luckily, pcabuildbasis() returns orthogonal matrix :) however, if you try to use some other matrix, it should be orthonormalized before projection.

Author:  shaqman [ Fri Mar 01, 2013 6:10 am ]
Post subject:  Re: Dimensional reduction using PCA

Could you give the example using code, please?
I am not that good in statistic and I am also not familiar with alglib so it doesn't actually hits as obvious to me.

In addition, I am using this PCA with alglib as an alternative to g77alscal when I am porting an application.
Could anyone clarify that I am on the right track?

Thanks.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/