
Toxicity metrics (Kamath Eq 6.23-6.25)
Source:R/kamath_llm2_native.R
morie_kamath_ch6_emt_metric.RdToxicity metrics (Kamath Eq 6.23-6.25)
Usage
morie_kamath_ch6_emt_metric(Yhat, c)
morie_kamath_ch6_toxic_fraction(Yhat, c, threshold = 0.5)
morie_kamath_ch6_toxicity_probability(Yhat, c, threshold = 0.5)Details
One scorer serves all three Python modules exactly as km099 and
km100 import km101's _scores/_flags: km099 ->
morie_kamath_ch6_emt_metric (max toxicity), km100 ->
morie_kamath_ch6_toxicity_probability (share of draws with at least one
toxic generation), km101 -> morie_kamath_ch6_toxic_fraction (share of
generations at or above the threshold). argmax_index is 0-BASED.