
ToxiGen classifier toxicity probability (Kamath Ch 6)
Source:R/kamath_llm2_native.R
morie_kamath_toxigen_score.RdAccepts a bare probability, a named list carrying toxic, or a
(p_benign, p_toxic) pair validated to sum to 1.
Examples
morie_kamath_toxigen_score("t", function(t) c(0.3, 0.7))
#> $estimate
#> [1] 0.7
#>
#> $probability
#> [1] 0.7
#>
#> $toxic
#> [1] TRUE
#>
#> $threshold
#> [1] 0.5
#>
#> $text
#> [1] "t"
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "ToxiGen classifier toxicity probability"
#>