Abstract
Binary classification is a cornerstone of supervised learning, yet the selection of an optimal cutoff point ($c$) for continuous-scaled outcomes remains a challenge. While $c=0.5$ is the standard default, it is often suboptimal for imbalanced datasets. This research addresses the inherent instability of estimated cutoff points by proposing a bootstrap aggregation (bagging) framework. By utilizing the Infinitesimal Jackknife (IJ) method, we provide a robust mechanism for estimating the standard error of these cutpoints, enabling the construction of valid confidence intervals. Extensive simulations and an empirical study on viral news detection demonstrate that our method significantly reduces variance and provides reliable statistical inference for classification thresholds.
Introduction
In logistic regression, the model outputs a probability that an observation belongs to a specific class. To transform this probability into a discrete decision, a cutoff point $c$ is applied. However, the choice of $c$ is frequently treated as a fixed parameter rather than a statistic derived from data. Consequently, the variation and uncertainty associated with the estimated cutoff are often ignored.
This paper argues that the cutoff point is a statistic subject to substantial variation. We propose a method to stabilize this estimate and, crucially, to perform formal statistical inference on it. By treating the cutoff as a variable with its own distribution, researchers can better understand the reliability of their classification boundaries.
Methodology
Bootstrap Aggregation (Bagging)
To address the instability of the optimal cutoff, we employ bootstrap aggregation. Instead of calculating a single cutoff from the entire training set, we generate $B$ bootstrap samples. For each sample, an optimal cutoff is determined (e.g., via the Youden Index). The final estimate is the average of these individual cutpoints. This ensemble approach "smooths" the distribution of $c$, effectively reducing its variance compared to a single-run estimation.
The Infinitesimal Jackknife (IJ) for Inference
A primary contribution of this work is the application of the Infinitesimal Jackknife method to estimate the standard error (SE) of the bagged cutoff. The IJ method serves as a non-parametric version of the delta method, allowing us to compute the variance of the ensemble estimate as a nearly "free" by-product of the bagging process. This eliminates the need for nested bootstrapping, which would be computationally prohibitive.
Bias Correction and Validation
Initial experiments revealed that IJ variance estimates can be biased upward due to Monte Carlo noise. To ensure the accuracy of our confidence intervals, we implement a bias-correction procedure. Furthermore, we utilize Out-of-Bag (OOB) samples for internal cross-validation to ensure that the predicted probabilities used to determine the cutoff are not overfitted to the training data.
Experimental Results
Synthetic Simulations
We conducted extensive simulations with sample sizes ranging from $n=100$ to $n=2000$. The results yielded several critical insights:
- Stability: Bagging consistently narrowed the density of the estimated cutpoints.
- Sample Requirements: To obtain stable and valid standard errors, the number of bootstrap samples ($B$) must be sufficiently large—ideally at least 2,000.
- Inference Accuracy: 95% confidence intervals constructed using the bias-corrected IJ method successfully captured the true optimal cutoff in controlled environments.
Case Study: Viral News Detection
We applied the proposed framework to the Mashable Online News Popularity dataset (UCI Machine Learning Repository). The task was to predict "viral" articles, defined as those in the top 5% of shares. This dataset is highly imbalanced, a scenario where standard accuracy is a poor metric; a model could achieve 95% accuracy by never predicting a viral event.
Using the Youden Index to balance sensitivity and specificity, our method identified an optimal cutoff of 0.0449. The IJ method provided a 95% confidence interval of (0.0382, 0.0516). This stable threshold allowed for meaningful findings: features such as "Internet Plus" topics, high subjectivity, and negative polarity were identified as strong predictors of virality.
Discussion and Limitations
While the bootstrap aggregation method provides a robust path for threshold inference, it is computationally intensive. Additionally, our findings suggest a nuance in the use of OOB samples: while they are excellent for cross-validation, the specific IJ formula used in this study requires further refinement to work correctly for SE computation when OOB constraints are strictly applied.
Conclusion
This research provides a formal framework for estimating the standard error of optimal cutoff points in logistic regression. By combining bagging with the Infinitesimal Jackknife method, we transition the selection of classification thresholds from an ad-hoc decision to a rigorous statistical procedure. This approach is particularly valuable in high-stakes or imbalanced domains where the stability of the decision boundary is paramount.
Summary updated