Clear Filters
Clear Filters

how to reduce the dimension of a feature space?

1 view (last 30 days)
I have 260 sample,each sample has 320 feature (x is a matrix with 260 rows & 320 column).in order to improve my classification,i need to reduce these 320 column(i mean number of features).but i dont know how to do. when i use for example:
[pc,score,latent,tsquare] = princomp(X);
red_dim = score(:,1:50);
how to reconstruct the matrix with fewer column?
when i use :
residuals = pcares(X,ndim)
the dimension of residuals is the same of x !!!!

Answers (1)

David Sanchez
David Sanchez on 5 Jun 2013
you may use reshape.
help reshape
  1 Comment
sorena mirzaie
sorena mirzaie on 5 Jun 2013
Edited: Walter Roberson on 5 Jun 2013
I check it,but in B=reshape(A),number of elements in A and B should be the same.
actually i want to reduce dimension my feature space according to its principle componants.
[pc,score,latent,tsquare] = princomp(X);
above line give me the principle componant of X,
i want to use just 50 dimensions among 320 dimensions.
red_dim = score(:,1:50);
above line do this for me ,but i dont know how to apply it to matrix X

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!