Skip to main content
. Author manuscript; available in PMC: 2019 May 22.
Published in final edited form as: J Mach Learn Res. 2015;16:3367–3402.

Algorithm 3.1.

Rank-Restricted Efficient Maximum-Margin Matrix Factorization: softImpute-ALS
1.InitializeA=UDwhereUm×ris a randomly chosen matrix with orthonormal columns andD=Ir,ther×ridentity matrix, andB=VDwithV=0.Alternatively, any prior solutionA=UDandB=VDcould be used as a warm start.2.GivenA=UDandB=VD,approximately solveminimizeB˜12PΩ(XAB˜T)FT+λ2B˜F2(20)to updateB.We achieve that with the following steps:(a) LetX*=(PΩ(X)PΩ(ABT))+ABT,stored assparsepluslow-rank.(b) SolveminimizeB˜12X*AB˜TF2+λ2B˜F2,(21)with solutionB˜T=(D2+λI)1DUTX*=(D2+λI)1DUT(PΩ(X)PΩ(ABT))(22)+(D2+λI)1D2BT.(23)(c) Use this solution forB˜and updateVandD:i.Compute the SVD decompositionB˜D=U˜D˜2V˜T;ii.VU˜,andDD˜.3.GivenB=VD,solve forA.By symmetry, this is equivalent to step2,withXTreplacingX,andBandAinterchanged.4.Repeat steps(2)(3)until convergence.5.ComputeM=X*V,andthenit'sSVD:M=UDσRT.Then outputU,VVRandDσ,λ=diag[(σ1λ)+,,(σrλ)+].