D measures the distance between a model's classification accuracy (ESS) and chance, expressed relative to the number of terminal prediction strata. Formula: \(D = \frac{100}{ESS / strata} - strata\), where strata counts terminal prediction endpoints only.
Arguments
- fit
An
oda_fitobject fromoda_fit.
Value
A scalar numeric D value, or NA_real_ when the fit
failed or the rule type does not have an unambiguous strata count.
Details
Supported rule types and strata definitions:
Binary (
oda_fit_binary): strata = 2, ESS =fit$ess.Multiclass ordered (
multiclass_orderedrule): strata =length(fit$rule$seg_classes), ESS =fit$ess.Multiclass nominal/categorical: returns
NA_real_(strata count is ambiguous without additional canon specification).Failed fit (
ok = FALSE): returnsNA_real_.