Formula: FM (low-order) + DNN (high-order) on shared embedding
Details
The wide part is a factorization machine over the shared embedding V, the deep part an MLP over the same V, and the logit is their sum through a sigmoid. Sharing the embedding is the whole point: no hand-crafted crosses and no separate pretraining. With the deep branch scaled to zero the prediction is exactly the FM prediction.
References
Guo, Tang, Ye, Li & He (2017), DeepFM, IJCAI 2017:1725-1731; Rendle (2010), Factorization Machines, ICDM 2010:995-1000.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
DeepF(V)
#> $estimate
#> [1] 0.5451706
#>
#> $p_hat
#> [1] 0.5118920 0.5216619 0.5311855 0.5405734 0.5499326 0.5592565 0.5685389
#> [8] 0.5783243
#>
#> $fm_part
#> [1] 0.04147198 0.08294395 0.12441593 0.16588790 0.20735988 0.24883185 0.29030383
#> [8] 0.33177580
#>
#> $deep_part
#> [1] 0.0061047996 0.0037578002 0.0004883411 -0.0032366098 -0.0069615606
#> [6] -0.0106865114 -0.0144114622 -0.0158773871
#>
#> $logloss
#> [1] NaN
#>
#> $n
#> [1] 8
#>
#> $p
#> [1] 1
#>
#> $K
#> [1] 4
#>
#> $method
#> [1] "DeepFM: factorization machine plus deep network"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
