Algorithm for finding a L1-norm best-fit subspace of dimension m − 1. | |
---|---|
Given a data matrix with full column rank. | |
1: Set j* = 0, R0(X)=∞. | /* Initialization. */ |
2: for (j = 1; j ≤ m; j = j + 1) do | |
3: Solve , subject to |
/*Find the L1 regression with variable j as the dependent variable.*/ |
4: if if Rj(X) < Rj* (X), then |
/* if the fitted subspace for variable j is better than that for j**/ |
5: j* = j, β* = β. | /* Update the coefficients defining the best fit subspace */ |
6: end if | |
7: end for |