forum.alglib.net

ALGLIB forum
It is currently Fri Sep 20, 2024 9:26 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Dimensional reduction using PCA
PostPosted: Mon Feb 06, 2012 3:02 am 
Offline

Joined: Fri Feb 03, 2012 8:39 pm
Posts: 2
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!!


Top
 Profile  
 
 Post subject: Re: Dimensional reduction using PCA
PostPosted: Mon Feb 06, 2012 3:15 am 
Offline

Joined: Fri Feb 03, 2012 8:39 pm
Posts: 2
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?


Top
 Profile  
 
 Post subject: Re: Dimensional reduction using PCA
PostPosted: Tue Feb 07, 2012 5:21 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 922
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.


Top
 Profile  
 
 Post subject: Re: Dimensional reduction using PCA
PostPosted: Fri Mar 01, 2013 6:10 am 
Offline

Joined: Fri Mar 01, 2013 6:07 am
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group