Correcting a Classifier When Class Frequencies Change: Prior Adjustment by EM and by Confusion-Matrix Inversion on Three UCI Data Sets, and When the Correction Does Not Help

A classifier trained where 40% of cases are positive will give poorly calibrated probabilities where 10% are. If only the class frequencies change (label shift), Bayes' rule gives an exact correction once the new frequency is known, and the frequency can be estimated from unlabelled data. I compare two estimators, the EM method of Saerens, Latinne and Decaestecker and black-box shift estimation (BBSE) by confusion-matrix inversion, with no correction and with the correction at the true frequency, using logistic regression on three UCI data sets and test sets resampled to seven target prevalences from 0.1 to 0.9 (50 replicates each). On the MAGIC gamma telescope data, averaged over targets, correction cuts log loss from 0.5204 to 0.3704 (EM) and 0.3702 (BBSE), against 0.3697 with the true frequency, and cuts the error in the estimated prevalence from 0.1795 to 0.0100 and 0.0092. On spambase the log loss falls from 0.2505 to about 0.195. On the banknote data, where the classifier is nearly perfect, the gain is small (0.0570 to 0.0466–0.0485) and at high target prevalences accuracy is slightly lower after correction. Both estimators come within 0.0018 of the oracle log loss on average. The correction helps most when the shift is large and the classifier's probabilities are uncertain.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-30
DOI
https://doi.org/10.5281/zenodo.23787388
Primary Topic
Imbalanced Data Classification Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Correcting a Classifier When Class Frequencies Change: Prior Adjustment by EM and by Confusion-Matrix Inversion on Three UCI Data Sets, and When the Correction Does Not Help

Manoj Kumar Aguru
1 links
Zenodo (CERN European Organization for Nuclear Research)
Imbalanced Data Classification Techniques
preprint

Correcting a Classifier When Class Frequencies Change: Prior Adjustment by EM and by Confusion-Matrix Inversion on Three UCI Data Sets, and When the Correction Does Not Help

Manoj Kumar Aguru
preprint en

Abstract

A classifier trained where 40% of cases are positive will give poorly calibrated probabilities where 10% are. If only the class frequencies change (label shift), Bayes' rule gives an exact correction once the new frequency is known, and the frequency can be estimated from unlabelled data. I compare two estimators, the EM method of Saerens, Latinne and Decaestecker and black-box shift estimation (BBSE) by confusion-matrix inversion, with no correction and with the correction at the true frequency, using logistic regression on three UCI data sets and test sets resampled to seven target prevalences from 0.1 to 0.9 (50 replicates each). On the MAGIC gamma telescope data, averaged over targets, correction cuts log loss from 0.5204 to 0.3704 (EM) and 0.3702 (BBSE), against 0.3697 with the true frequency, and cuts the error in the estimated prevalence from 0.1795 to 0.0100 and 0.0092. On spambase the log loss falls from 0.2505 to about 0.195. On the banknote data, where the classifier is nearly perfect, the gain is small (0.0570 to 0.0466–0.0485) and at high target prevalences accuracy is slightly lower after correction. Both estimators come within 0.0018 of the oracle log loss on average. The correction helps most when the shift is large and the classifier's probabilities are uncertain.

Zenodo (CERN European Organization for Nuclear Research)
Chaitanya (IN)
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
Correcting a Classifier When Class Frequencies Change: Prior Adjustment by EM and by Confusion-Matrix Inversion on Three UCI Data Sets, and When the Correction Does Not Help — Manoj Kumar Aguru · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS