Algorithm L1-PCA* | |
---|---|
Given a data matrix with full column rank. | |
1: Set Xm = X; set Vm+1 = I; set (Ij*)m+1 = I. | /* Initialization. */ |
2: for (k = m; k > 1; k = k − 1) do | |
3: Set and βk = β* using the Algorithm for finding a L1-norm best-fit subspace of dimension m − 1. |
/* Find the best-fitting L1 subspace among subspaces derived with each variable j as the dependent variable. */ |
4: Set Zk = (Xk)((Ij*)k)T. | /* Project points into a (k − 1)-dimensional subspace. */ |
5: Calculate the SVD of Zk, Zk = UΛVT , and set Vk to be equal to the (k − 1) columns of V corresponding to the largest values in the diagonal matrix Λ. | /* Find a basis for the (k − 1)-dimensional subspace. */ |
6: Set | /* Calculate the kth principal component. */ |
7: Set X(k−1) = ZkVk. | /* Calculate the projected points in terms of the new basis. */ |
8: end for | |
9: Set . | /* Calculate the first principal component. */ |
Notes on L1-PCA*