Stabilizing F1 Decision Thresholds When Positives Are Scarce - A Simple Plug-in Average and an Empirical Comparison with Meta-Learned Thresholds
Threshold moving is a cheap and effective remedy for class imbalance, but the usual way of choosing the threshold, maximizing F1 on out-of-fold predictions, becomes unreliable when the training set holds only a few dozen positive cases. We compare threshold estimators under controlled positive budgets of 10, 20, 30 and 50 on 31 public imbalanced datasets from 19 families, using logistic regression and random forest classifiers with 20 repetitions per setting (4,840 runs in total). The estimators are the standard cross-validated threshold, the plug-in threshold equal to half the best out-of-fold F1, their equal-weight average, an inverse-variance weighted variant, and two meta-learned estimators trained leave-one-family-out on 16 data-complexity and score meta-features. The equal-weight average needs only the training set, yet it improved mean test F1 over the cross-validated threshold in all eight settings, by 0.005 to 0.010. The gain was significant across datasets in every setting and across dataset families in seven of eight (Holm-adjusted Wilcoxon tests), and the spread of the selected threshold fell by 40 to 50 percent. Meta-learned thresholds added a significant gain only with the random forest at 10 positives (plus 0.008 F1) and otherwise matched or trailed the simple average. We recommend the CV–plug-in average as a default whenever positives are scarce.
Authors
- Anandarup Roy (ORCID: https://orcid.org/0000-0001-9084-3949)
- Utpal Roy (ORCID: https://orcid.org/0000-0002-7057-2333)
- Debashis Roy (ORCID: https://orcid.org/0009-0005-3374-5679)
Institutions
- Visva-Bharati University (IN)
- Sarojini Naidu College for Women (IN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.5281/zenodo.24551631
- Primary Topic
- Imbalanced Data Classification Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00