Uncertain Performance: How to Quantify Uncertainty and Draw Test Sets When Evaluating Classifiers

Supervised machine learning has become increasingly popular in social science research, often employing classifiers to measure political constructs. Although evaluating classifiers on a test set is critical for establishing their validity, guidance on how to conduct such evaluation is limited. In particular, researchers have paid insufficient attention to the variance of performance metrics estimated on test sets. This article demonstrates that typically sized test sets yield highly noisy and often uninformative estimates of classifier performance, particularly for imbalanced tasks—common in social science applications like identifying hateful or emotional speech—where one outcome class is rare. To address this issue, this article introduces methods to quantify uncertainty in performance estimates based on their sampling distribution and validated with simulations. It also introduces a design-based approach in political science to enhance statistical precision when evaluating classifiers: efficient stratified sampling based on the outcome’s predicted probability. Simulations using synthetic and real data show that this strategy meaningfully reduces the variance of performance estimates, especially in imbalanced tasks, while ensuring that they remain consistent. Finally, the article illustrates how to calculate the test set size required to achieve a desired level of statistical precision. Accompanying statistical software enables researchers to easily implement these methods.

Authors

Institutions

Publication Details

Journal
Political Analysis
Published
2026-11-24
DOI
https://doi.org/10.1017/pan.2026.10065
Primary Topic
Imbalanced Data Classification Techniques
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Uncertain Performance: How to Quantify Uncertainty and Draw Test Sets When Evaluating Classifiers

Francisco Tomás-Valiente
Political Analysis
Imbalanced Data Classification Techniques
article

Uncertain Performance: How to Quantify Uncertainty and Draw Test Sets When Evaluating Classifiers

Francisco Tomás-Valiente
article en

Abstract

Supervised machine learning has become increasingly popular in social science research, often employing classifiers to measure political constructs. Although evaluating classifiers on a test set is critical for establishing their validity, guidance on how to conduct such evaluation is limited. In particular, researchers have paid insufficient attention to the variance of performance metrics estimated on test sets. This article demonstrates that typically sized test sets yield highly noisy and often uninformative estimates of classifier performance, particularly for imbalanced tasks—common in social science applications like identifying hateful or emotional speech—where one outcome class is rare. To address this issue, this article introduces methods to quantify uncertainty in performance estimates based on their sampling distribution and validated with simulations. It also introduces a design-based approach in political science to enhance statistical precision when evaluating classifiers: efficient stratified sampling based on the outcome’s predicted probability. Simulations using synthetic and real data show that this strategy meaningfully reduces the variance of performance estimates, especially in imbalanced tasks, while ensuring that they remain consistent. Finally, the article illustrates how to calculate the test set size required to achieve a desired level of statistical precision. Accompanying statistical software enables researchers to easily implement these methods.

Political Analysis
ETH Zurich (CH)
Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung
Imbalanced Data Classification Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon