Skip to contents

The smoothed relative rank \(\\sigma(r_j - r_i)\) plus, when regularize=TRUE, the load-bearing \(\\sigma(r_j^2)\) term that stops scores from running away.

Usage

morie_gru4r_top1(r_target, r_negatives, regularize = TRUE)

Arguments

r_target

Score of the target item.

r_negatives

Numeric vector of negative-item scores.

regularize

Include the sigma(r_j^2) regulariser.

Value

Scalar loss.

Examples

morie_gru4r_top1(r_target = 2, r_negatives = c(0.5, 1, -1))
#> [1] 0.8410288