Skip to contents

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.

Usage

oda_d_stat(fit)

Arguments

fit

An oda_fit object from oda_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_ordered rule): 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): returns NA_real_.