Skip to contents

Compute a weighted binary confusion table from actual and predicted labels.

Usage

oda_confusion_binary(y, y_pred, w = NULL)

Arguments

y

Actual class labels (0/1 integer).

y_pred

Predicted class labels (0/1 integer).

w

Optional numeric weights. Default: unit weights.

Value

Named list with integer count fields TP, TN, FP, FN (weighted sums), and rate fields sensitivity, specificity (proportions in [0, 1]), and mean_pac (proportion in [0, 1]).

Note: With unit weights these are raw integer counts. With prior-odds weights (from oda_univariate_core with priors_on = TRUE) they are weighted counts, not raw integers.