How to use Principal Component Analysis to reduce feature vector size?

Asked by DS about 11 hours ago
Latest activity Answered by Shashank about 10 hours ago

I am working on emotion recognition.Feature vector size i got is 90x21952(90 is the number of images and 21952 is the coefficients).How can i use princomponent analysis to reduce the feature vector dimension.I am using princomp to find the principal component after that wheter i need to multiply this with meanadjusted original data.If i do so the dimension is no reducing. Please help me.

0 Comments

DS

Products

No products are associated with this question.

1 Answer

Answer by Shashank about 10 hours ago

Use PCARES function to do that:

[residuals,reconstructed] = pcares(X,ndim)

The 'reconstructed' will have the reduced dimensions data based on the ndims input. Note that 'reconstructed' will still be the original dimension. You can choose the first ndims if you'd like.

If you want the reduced dimensions in the new basis then just take the first ndims of the SCORE variable

SCORE(:,1:ndims)

[COEFF,SCORE] = princomp(X)

http://www.mathworks.com/help/stats/princomp.html

http://www.mathworks.com/help/stats/pcares.html

0 Comments

Shashank

Contact us