Table 7.
Sensitivity analysis of missing-label handling: macro-F1 and macro-AUC under the complete-case (Definition B), untested-as-negative (Definition A) and prevalence-based imputation definitions.
| Label definition | Sample size | Train/Test | Macro-F1 | Common Macro-F1 | Macro-AUC |
|---|---|---|---|---|---|
| Definition A: all samples, “untested” coded as negative | 24,689 | 19,751/4,938 | 0.1527 | 0.2292 | 0.7653 |
| Definition B: complete-testing samples, authentic labels (primary) | 21,395 | 17,116/4,279 | 0.1553 | 0.2202 | 0.7702 |
| Imputation (n = 24,689) | 24,689 | 19,751/4,938 | 0.1537 | 0.2184 | 0.7605 |
| Difference (B − A) | — | — | +0.0026 | −0.0090 | +0.0049 |
The two label definitions shared identical feature engineering, algorithms, hyperparameters, random seeds and threshold-selection protocols; the only differences were label definition and sample inclusion. Imputation-based labels were drawn from a Bernoulli distribution with each pathogen’s cohort prevalence among the records with any untested pathogen (fixed seed); complete records kept their authentic labels. All three strategies shared identical features, algorithms, splits and threshold-selection protocols. All analyses used a fixed random seed of 42.