
Co-Occurrence Bias Score (Kamath Eq 6.14)
Source:R/kamath_llm2_native.R
morie_kamath_ch6_co_occurrence_bias.Rdlog P(w|A_i) / P(w|A_j) over generated text.
Examples
morie_kamath_ch6_co_occurrence_bias(w = 5L, A_i = c(1, 2, 3, 4, 5, 6, 7, 8),
A_j = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 0
#>
#> $p_given_Ai
#> [1] 0.125
#>
#> $p_given_Aj
#> [1] 0.125
#>
#> $count_Ai
#> [1] 1
#>
#> $count_Aj
#> [1] 1
#>
#> $n
#> [1] 16
#>
#> $method
#> [1] "Co-Occurrence Bias Score (Kamath Eq 6.14)"
#>