Skip to contents

Bradley-Terry preference probability (Kamath Eq 5.8-5.9)

Usage

morie_kamath_ch5_bradley_terry_pref(r_star, y_w, y_l)

morie_kamath_ch5_pref_sigmoid_form(r_star)

Arguments

r_star

Named reward vector or function.

y_w, y_l

Responses.

Value

List with estimate, margin, r_w, r_l.

Details

One sigmoid serves both Python modules exactly as km073 calls km072: km072 -> morie_kamath_ch5_bradley_terry_pref (named or function rewards), km073 -> morie_kamath_ch5_pref_sigmoid_form (a bare pair).

Examples

morie_kamath_ch5_bradley_terry_pref(c(a = 2, b = 0.5), "a", "b")
#> $estimate
#> [1] 0.8175745
#> 
#> $margin
#> [1] 1.5
#> 
#> $r_w
#> [1] 2
#> 
#> $r_l
#> [1] 0.5
#> 
#> $p_reversed
#> [1] 0.1824255
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "Bradley-Terry preference probability (Kamath Eq 5.8)"
#>