Skip to main content
. Author manuscript; available in PMC: 2014 May 1.
Published in final edited form as: Comput Stat Data Anal. 2012 Nov 20;61:83–98. doi: 10.1016/j.csda.2012.11.007
Algorithm for finding a L1-norm best-fit subspace of dimension m − 1.
Given a data matrix XRn×m with full column rank.
1: Set j* = 0, R0(X)=∞. /* Initialization. */
2: for (j = 1; jm; j = j + 1) do
3: Solve Rj(X)=β,e+,eminΣi=1nei++ei,
 subject to
βTxi+ei+ei=0,i=1,,n,βj=1,ei+,ei0,i=1,,n.
/*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