Skip to contents

lam * MEAN log P(a_i)/P(a_j) over the K word pairs; the unweighted SUM is reported alongside.

Usage

morie_kamath_ch6_log_prob_ratio_attr(a_i, a_j, K = NULL, lam = 1)

Arguments

a_i, a_j

Paired probabilities in (0, 1].

K

Optional count.

lam

Finite weight.

Value

List with estimate, unweighted, per_pair.

Examples

morie_kamath_ch6_log_prob_ratio_attr(c(0.6, 0.4), c(0.4, 0.6),
    lam = 2)
#> $estimate
#> [1] -5.551115e-17
#> 
#> $unweighted
#> [1] -5.551115e-17
#> 
#> $per_pair
#> [1]  0.4054651 -0.4054651
#> 
#> $lam
#> [1] 2
#> 
#> $K
#> [1] 2
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "equalising log-probability-ratio regulariser (Eq 6.22)"
#>