I have a set of N, N>>n. n-dimensional vectors and would like to represent each of them, with approximation, as a linear combination of m, m < n, n-dimensional vectors. How should I choose the vectors so that the approximation is the best possible? I think it is an extension of the least square fitting of a line through points in a 2D plane, but I don't know how.
Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)
|
1
|
||||||||||||||||||||
|
|
1
|
Hmm, I'm not sure, whether I got your problem right, but well, I'll give it a try. I assume the N datvectors as rowvectors consisting of n datapoints (where n << N). Then the usual PCA assumes the columns as axes in an n-dimensional coordinate-system having N vectors beginning at the origin, say the data-matrix $\small Z $. The usual principal components can then be found by rotations of the columns, in matrix-notation $\small Z \cdot T$ , where $\small T $ is a rotation-matrix. Now I understand your question such that you want to express your N data-vectors as linear combinations of a smaller set of (pairwise orthogonal) component(-vectors). This seems simply the question of rotating the rows of $\small Z$ to their PC-position, thus $\small T \cdot Z $ and you get (at most) n component-rowvectors which can be composed to represent $\small Z $ by the inverse row-rotation. Example: (sorry, this is in my proprietary MatMate-code (don't have Maple/Matlab/Math'ca) but should illustrate the pseudocode sufficiently) see protocol of worked example :
|
|||
|
|

