Skip to main content
. 2013 Nov 6;13(11):15172–15186. doi: 10.3390/s131115172

Algorithm 1: The Multi-Matrices Factorization Algorithm.

Input: matrix R; number of the latent features, d; learning rates, η1, η2, η3 and η4; regularization parameters, α and λ; threshold ϵ.
Output: the estimated matrix, .
// Initialize U and V.
1 Draw random vectors, U(1),1, U(1),2, …, U(1),n, V1N(0, I);
2 for j = 2; jt; j + + do
3  Let Vj = Vj−1 + Z; here Z ∼ Laplace(0, 1);
4 end
5 for j = 2; jt; j + + do
6 for i = 1; in; i + + do
7   Let U(j),i = U(j-1),i + Z; here Z ∼ Laplace(0, 1);
8 end
9 end
// Coordinate descent.
10 W1=i=1nj=1t(Ri,jU(j),iTVj)2I(Ri,j)+αj=1tU(j),122+βV122+γi=1nj=2tU(j),iU(j1),i1+λj=2tVjVj11;
11
12 W2 = inf;
13 while |W2W1| > ϵ do
14 W2 = W1;
15 for i= 1, 2 …, n do
16   Let U(1),inew=U(1),iη1W1U(1),i;
17 end
18 for j > 1 and i = 1, 2 …, n do
19   Let U(j),inew=U(j),iη2W1U(j),i
20 end
21 V1new=V1η3W1V1;
22 for j = 2 …, t do
23   Let Vjnew=Vjη4W1Vj;
24 end
25  Replace all U(j),is with U(j),inews and Vjs with Vjnews, recompute W1;
26 end
27 return , where R^j=U(j)TVj;