I Have 2 big matrix A, B with the same dimension (mxn) that n>>m. I apply the princomp function on those for computing the principal components because I wanted to reduce those dimension for comparing those with each other. I want to find that which row of those matrices has biggest difference with each other. Is it possible by comparing the angles between the eigenvectors that I computed by the princomp function (principal components of the 2 matrix)?? It really appreciated if you get me some proposal and help. Thank you for your time and help. Kamal

댓글 수: 3

Jan
Jan 2013년 11월 23일
You "want to find which row has the biggest difference with each other". This seems to imply, that you have to calculate the differences between the rows, not eigen-values, principal components or angles. What does each other mean here?
Image Analyst
Image Analyst 2013년 11월 23일
I agree with Jan - I'm confused too. After you do PCA on A and on B, you'll have two more sets of axes (one for each PC set on A and B) Are you comparing rows of A to rows of A? And same for B? Or are you comparing rows of A to rows of B? Or the angle between PC1 of A with PC2 of A? Or PC1 of A with PC1 of B? Please clarify.
Kamal
Kamal 2013년 11월 23일
편집: Kamal 2013년 11월 23일
Many thanks for your comments. as I mentioned before, my final goals is comparing the row of A to rows of B. but I want to use the PCA for this goal. How I can? Please note that the each row of both matrices involved the continuous information and there are very noisy. For example the status of first row of A is same as first row of B. Also the status of the second row is same as the second on and so on.... So, I decided to used from the angle of the principal components method for comparing that works for all Matrices.I need to indicate that for example the k-th row is the row with the biggest variation(along the all columns). Is it OK or not? thanks again for your help.

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

답변 (1개)

Image Analyst
Image Analyst 2013년 11월 23일
편집: Image Analyst 2013년 11월 23일

1 개 추천

Try this
comparison = abs(A-B);
[maxValue, indexOfMax] = max(comparison);
% Get row and column from linear index.
[row, col] = ind2sub(size(A), indexOfMax);
How does that work for you?

카테고리

도움말 센터File Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

질문:

2013년 11월 23일

편집:

2013년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by