Skip to contents

MEAN log P(modified token | unmodified context) – a mean, not the sum that Eq 6.10 takes.

Usage

morie_kamath_ch6_cat_metric(M, U, theta = NULL)

Arguments

M

Modified tokens.

U

Unmodified context.

theta

Optional function (M, U, i) with i 0-BASED.

Value

List with estimate, per_token, n_context.

Examples

morie_kamath_ch6_cat_metric(c(0.5, 0.25), c("u1", "u2"))
#> $estimate
#> [1] -1.039721
#> 
#> $per_token
#> [1] -0.6931472 -1.3862944
#> 
#> $n_context
#> [1] 2
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "Context Association Test score (Kamath Eq 6.12)"
#>