Feature vector dimension reduction (PCA)

조회 수: 8 (최근 30일)
Andrea Daou
Andrea Daou 2021년 6월 9일
댓글: Andrea Daou 2021년 6월 11일
Hello,
How can reduce a feature vector of dimension K*N to a feature vectore of dimension K*M with M<N (image classification task)?
I read about PCA but I am not understanding how can I use it to get the K*M vector.
Appreciate your help!
  댓글 수: 4
Andrea Daou
Andrea Daou 2021년 6월 9일
편집: Andrea Daou 2021년 6월 9일
I read about [coeff, score] = pca(features) but for example if I have a dimesion equal to 1340*5435 and I want to pass to 1340*M, is new_features = score(:,1:M) a good solution ?
This solution has a limitation: M cannot take a value > 1340
Thank you in advance,
J. Alex Lee
J. Alex Lee 2021년 6월 9일
I'm not sure what is returned by pca(), but presumably coeff is KxN (the rotated coefficents)? Then is your question how to decide M? Is score a vector 1xN?

댓글을 달려면 로그인하십시오.

채택된 답변

the cyclist
the cyclist 2021년 6월 9일
I have written an answer to this question that explains in detail how to use MATLAB's pca function, including how to do dimensional reduction. I suggest that you read that question, answer, comments from other users, and my responses. I expect this will answer your question.
  댓글 수: 4
the cyclist
the cyclist 2021년 6월 11일
Use the coeff matrix from the PCA you did previously, to transform the 1xN vector in the original space into a 1xN vector in the PC space, then use the first M columns. That 1xM vector is the feature-reduced vector in the new space.
Andrea Daou
Andrea Daou 2021년 6월 11일
Okay, Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by