0

I wanted to reduce a bigger dimension matrix i.e. 2000*768; to some lower dimensions i.e 200*768 or 400*400 (not fixed); using principal component analysis (PCA) in MatLab. I wanted to do it for feature dimension reduction. How can I do it easily? And please suggest me some tutorials to understand PCA better.

Thanks in advance.

Saimun
  • 1
  • 1
  • 1
  • Welcome to SO! Please take a look at http://stackoverflow.com/tour. Usually you show what have you tried before asking a question here. – brodoll May 08 '15 at 13:59
  • Surprised you didn't use Google. The duplicate link was the first one I found. – rayryeng May 08 '15 at 18:06

1 Answers1

1

PCA is a really useful tool for dimensionality reduction, but it should be used when you understand exactly what it is doing and what you are getting out of it. For a good intro click here - it is a decent explanation which is not too hard to follow. There is also this article which is a quick DIY walkthrough which may help you understand better what is going on.

Once you know what you are getting, PCA is easy in matlab. Just type pca(X) and you can perform it on data set X.

What you get out is very much dependent on what you get in (e.g. things like normalisation are very important for input data), and you can use extra parameters that are worth knowing about to set up you principal component analysis. See matlab's guide here.

What you are looking for in dimensionality reduction to best represent the data with as few components as possible. Using the explained output of [coeff,score,latent,tsquared,explained] = pca(X) you get a vector telling you how much of the data is explained by each principal component, which gives you a good indication of whether dimensionality reduction can be done.

Community
  • 1
  • 1
cwissy
  • 513
  • 3
  • 9
  • 1
    While the answer is interesting, I don't think you should be answering this type of question, as it encourages off-topic discussions. – Ander Biguri May 08 '15 at 14:27
  • 1
    Ok, left it as generic as possible so that it can be investigated if OP wanted. Probably should have just commented it. – cwissy May 08 '15 at 14:29
  • Actually questions asking for resources are considered offtopic by SO's standards – brodoll May 08 '15 at 14:36