mlquantify.adjust_counting#

Adjust Counting Methods#

CC

Classify and Count (CC) quantifier.

PCC

Probabilistic Classify and Count (PCC) quantifier.

FM

Friedman Method for quantification adjustment.

GAC

Generalized Adjusted Count method.

GPAC

Probabilistic Generalized Adjusted Count (GPAC) method.

ACC

Adjusted Count (ACC) — baseline threshold correction.

X_method

X method — threshold where \(\text{TPR} + \text{FPR} = 1\).

MAX

MAX method — threshold maximizing \(\text{TPR} - \text{FPR}\).

T50

T50 — selects threshold where \(\text{TPR} = 0.5\).

MS

Median Sweep (MS) — median prevalence estimate across all thresholds.

MS2

MS2 — Median Sweep variant constraining \(|\text{TPR} - \text{FPR}| > 0.25\).

evaluate_thresholds

Evaluate a range of classification thresholds to compute the corresponding True Positive Rate (TPR) and False Positive Rate (FPR) for a binary quantification task.

compute_tpr

Compute the True Positive Rate (Recall) for a binary classification task.

compute_fpr

Compute the False Positive Rate for a binary classification task.

compute_table

Compute the confusion matrix table for a binary classification task.