|
|
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, R̂. |
|
// Initialize U and V. |
| 1 |
Draw random vectors, U(1),1, U(1),2, …, U(1),n, V1 ∼ N(0, I); |
| 2 |
for
j = 2; j ≤ t; j + + do
|
| 3 |
Let Vj = Vj−1 + Z; here Z ∼ Laplace(0, 1); |
| 4 |
end |
| 5 |
for
j = 2; j ≤ t; j + + do
|
| 6 |
for
i = 1; i ≤ n; i + + do
|
| 7 |
Let U(j),i = U(j-1),i + Z; here Z ∼ Laplace(0, 1); |
| 8 |
end
|
| 9 |
end |
|
// Coordinate descent. |
| 10 |
; |
| 11 |
| 12 |
W2 = inf; |
| 13 |
while |W2 – W1| > ϵ
do
|
| 14 |
W2 = W1; |
| 15 |
for
i= 1, 2 …, n
do
|
| 16 |
Let
; |
| 17 |
end
|
| 18 |
for
j > 1 and i = 1, 2 …, n
do
|
| 19 |
Let
|
| 20 |
end
|
| 21 |
; |
| 22 |
for
j = 2 …, t
do
|
| 23 |
Let
; |
| 24 |
end
|
| 25 |
Replace all U(j),is with
and Vjs with
, recompute W1; |
| 26 |
end |
| 27 |
return
R̂, where
; |
|