p_ui = 1{r_ui > 0}, c_ui = 1 + alpha r_ui, and the exact alternating solutions x_u = (Y'C^u Y + lam I)^{-1} Y'C^u p(u), y_i = (X'C^i X + lam I)^{-1} X'C^i p(i).
Arguments
- R
Non-negative observation counts, m x n.
- f
Number of latent factors.
- lam
Ridge penalty.
- alpha
Confidence scaling.
- steps
Fixed number of alternating sweeps.
- X0, Y0
Starting factors; NULL uses the deterministic defaults x_uk = ((u+k) mod 5 + 1)/10 and y_ik = ((i+2k) mod 7 + 1)/10 with zero-based u, i, k.
References
Hu, Koren and Volinsky (2008), IEEE ICDM, 263-272, Equations (3), (4) and (5). Read from the authors' own PDF at yifanhu.net/PUB/cf.pdf.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Alsmf(V)
#> $X
#> [,1] [,2]
#> [1,] 0.9331703 2.799511
#> [2,] 0.9432834 2.829850
#> [3,] 0.9467601 2.840280
#> [4,] 0.9485190 2.845557
#> [5,] 0.9495809 2.848743
#> [6,] 0.9502917 2.850875
#> [7,] 0.9508008 2.852402
#> [8,] 0.9511833 2.853550
#>
#> $Y
#> [,1] [,2]
#> [1,] 0.1053586 0.3160757
#>
#> $loss
#> [1] 7.199531
#>
#> $fitted
#> [,1]
#> [1,] 0.9831748
#> [2,] 0.9938299
#> [3,] 0.9974929
#> [4,] 0.9993460
#> [5,] 1.0004649
#> [6,] 1.0012137
#> [7,] 1.0017501
#> [8,] 1.0021531
#>
#> $m
#> [1] 8
#>
#> $n
#> [1] 1
#>
#> $f
#> [1] 2
#>
#> $steps
#> [1] 10
#>
#> $method
#> [1] "Implicit-feedback ALS (Hu-Koren-Volinsky 2008 eqs. 3-5)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
