A Comparative Evaluation of Quantification Methods

Tobias Schumacher, Markus Strohmaier, Florian Lemmerich

In contemporary machine learning, the primary focus is frequently on individual instance prediction. However, in fields such as political science, market research, and epidemiology, the aggregate distribution—or prevalence—of classes is often more critical than individual labels. This task, known as Quantification, requires specialized techniques to estimate class proportions accurately, especially under distribution shifts.

A recent study by Tobias Schumacher and colleagues provides a definitive "stress test" of the quantification landscape, evaluating 24 methods across 40 datasets and 5 million algorithm runs.

The Quantification Problem: The "Classify and Count" Trap

The most intuitive approach to prevalence estimation is Classify and Count (CC): training a classifier and counting its predictions on new data. However, CC is inherently biased. For instance, if a classifier has a 10% false positive rate, it will report a 10% prevalence even when the true prevalence is zero. While various "quantifiers" have been proposed to mitigate this, the field has lacked a standardized, large-scale comparison—until now.

Methodology and Algorithm Taxonomy

The researchers categorized 24 quantification algorithms into three primary families based on their underlying logic:

  1. Adjusted Count Adaptations: These apply post-hoc corrections to standard classifier outputs based on known error rates (e.g., Adjusted Count, Median Sweep).
  2. Distribution Matching: These methods estimate prevalence by matching the distribution of features or scores in the test set to a mixture of training distributions (e.g., HDy, Energy Distance Minimization).
  3. Classification-based Adaptations: These involve classifiers trained with loss functions specifically optimized for quantification accuracy (e.g., SVMperf).
Overview of the 24 quantification algorithms evaluated in the study, categorized by their multiclass and continuous support.

Experimental Design

The study's rigor stems from its scale. The authors utilized 40 datasets from the UCI repository and Kaggle, spanning domains from medical diagnostics to financial defaults.

Summary of the 40 datasets used for benchmarking, including dimensions (D), sample size (N), and number of classes (L).

The evaluation focused on "prior probability shift," where class proportions change significantly between training and testing. To further validate the results, top-performing methods were tested against the 2022 LeQua challenge benchmark.

Key Insights and Results

The massive benchmarking effort yielded several critical findings for practitioners:

  • CC and PCC are consistently poor performers: The study confirms that simple counting methods are among the least reliable, particularly in high-stakes scenarios.
  • The Multiclass Challenge: Moving beyond binary classification significantly increases difficulty. The common "One-vs-Rest" (OVR) strategy often fails; methods designed for multiclass settings, such as HDx and GPAC, are superior.
  • The Tuning Paradox: Improving the accuracy of the underlying classifier does not necessarily improve quantification performance. In some cases, it can even be detrimental.
  • Robustness of Simple Adjustments: Methods like Median Sweep (MS) proved remarkably stable and robust to noise, outperforming more complex alternatives in binary settings.

Conclusion

For binary quantification, Median Sweep (MS), TSMax, and Forman’s Mixture Model (FMM) are the recommended choices. For multiclass problems, HDx, Generalized Probabilistic Adjusted Count (GPAC), and the EM algorithm stand out. This research provides an essential roadmap for data scientists, highlighting that accurate "big picture" estimation requires moving beyond simple classification counts.

Summary updated

BibTeX
@misc{schumacher2021comparative,
  author = {Tobias Schumacher and Markus Strohmaier and Florian Lemmerich},
  title = {{A Comparative Evaluation of Quantification Methods}},
  year = {2021},
  eprint = {2103.03223},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.03223},
}
Figure