LLM-as-a-Judge
A model can grade thousands of answers overnight. It can also favor longer answers or the one shown first. Check the judge before trusting its scores.
A model can grade thousands of answers overnight. It can also favor longer answers or the one shown first. Check the judge before trusting its scores.
Two reviewers agree on 85% of labels. Kappa adds a marginal-frequency comparison, but neither measure establishes correctness or a ceiling for model judges.
A fictional claims model scores 0.97 offline and 0.71 on resolved production cases. Leakage, selection, and uncertain outcomes complicate both numbers.
A test set stops being an independent final check when its results guide model selection. One look per candidate does not prevent that feedback.
An evaluation protocol records the task, data boundaries, decision rules, and uncertainty methods before results influence model selection.
When fraud is one case in a thousand, a model that never flags fraud is 99.9% accurate. Imbalance is a fact to evaluate around, not a defect to remove.
A fictional churn project shows why predicting who will leave is not enough to decide whom to call. Evaluate incremental benefit, costs, and constraints.
Average precision: no undersampling 0.6740, random 0.6586, NearMiss-1 0.6551, NearMiss-3 0.6358, NearMiss-2 0.1719. AUROC barely showed the damage.
Mean pairwise label correlation of +0.5035, and subset accuracy fell from 0.8515 to 0.4278 as the label count went from one to eight.
The identity that makes micro precision, recall and F1 equal has one arithmetic reason — and an example that violates it cannot be real.
Forcing one label onto overlapping data left 57.38% of rows impossible to describe correctly, and one answer recovered 13.67% of the real tags.
Per class the false positives and false negatives look nothing alike. Their totals are identical, and that is the whole mechanism.
With one true and predicted label per sample and all classes included, micro precision, recall, and F1 equal accuracy. Label subsets and multilabel data break the identity.
Averaging then combining and combining then averaging give different answers. Which one your report contains is worth knowing.
Macro recall and unadjusted balanced accuracy match on the same present classes. Absent labels and zero-division conventions can change that comparison.
The same predictions can score 0.27, 0.81 or 0.94 macro precision. What changed was zero_division, not the model.
The same credit scores gave a credit-risk Gini of 0.6706 and an economics Gini of 0.4601. The analogy between the two curves is not an identity.
Equalized odds compares true and false positive rates within groups. Learn its denominators, relation to other criteria, threshold choices and practical limits.
Equal opportunity compares recall among positives. An example explains what it protects, which errors it leaves unconstrained and how labels affect it.
Demographic parity compares selection shares. Learn how to calculate it, interpret thresholds and assess what equal rates leave unresolved.
Moving one cut point across a series changed the MAE from 1.19 to 3.18 — same data, same model, nine defensible splits.
The first fold trained on 200 rows scores 1.77 and the last on 1,000 scores 0.87. Their mean summarizes this sequence of historical evaluations.
Leakage can distort evaluation through future features, preprocessing, or test feedback. Time and group splits help only when they match the intended task.
A class with three samples cannot appear in five folds. scikit-learn warns instead of failing, and the warning is easy to miss.
Selecting features on pure noise before the split turns a chance-level problem into 90 percent accuracy. Inside a pipeline it reads 0.53.
On one dataset, five-fold CV ranges from 0.47 to 0.62 across split seeds. A separate ten-fold simulation illustrates why naive fold error bars can be too small.
Random assignment supports the plain treated-versus-control comparison; random ranking supplies an uplift baseline. Observational estimates need additional identification and adjustment assumptions.
The incremental outcome accumulated as targeting goes deeper down an uplift ranking. Why it cannot be a sum over customers, and how to read where it flattens.
The extra outcome produced inside one slice of a ranking. Computed from response rates rather than counts, and not additive across slices when the treated share differs between them.
The incremental outcome collected down to a depth of a ranking. Accumulating slice by slice gives a different answer from computing it directly.
Radcliffe’s incremental gains chart: treated responders minus what an equal treated group would have produced untreated. Its baselines, and why they matter.
The per-unit output of an uplift model: a difference of two predicted probabilities, not a probability. What it supports, and what it cannot be checked against.
What models output per class, how they produce it, and the measured gap between a number in [0, 1] and a number you can act on.
Removing half the remaining errors reads as 1.5000, 1.2143, 1.0556 and 1.0051 depending only on the majority class.
Kaggle hosts machine learning competitions ranked on held-out data. A large study found little evidence of substantial leaderboard overfitting, but a competition score still measures one fixed task.
Equal-count bins instead of equal-width ones. What that fixes, what it does not, and why it can report a larger error for the same model.
The largest single deviation between predicted probability and observed frequency. Useful for spotting a dangerous region, fragile as a headline number.
What the curve shows, why it is invariant to prevalence-only shifts and strictly increasing rescaling, and where that invariance becomes a blind spot.
Use reliability, resolution and uncertainty to interpret a Brier score. A small exact example explains the terms and the limits of binned estimates.
A two-parameter logistic map from scores to probabilities, fitted on held-out data. An increasing logistic map on one scalar score preserves its ranking; a negative fitted slope can reverse it.
Non-decreasing fitted values can correct monotone probability distortions. Scikit-learn uses linear interpolation between fitted knots, and small calibration samples can overfit.
Probabilities too close to 0 and 1, intervals too narrow. A monotone sharpening can preserve accuracy at 0.5 and AUC while worsening probability estimates.
One model, one set of probabilities. Moving the cut-off from 0.10 to 0.90 took precision from 0.5271 to 0.9864 and recall from 0.8869 to 0.4306.
Training on the number and cutting afterward matched the classifier’s AUROC of 0.9967 — and also answered the numeric question at R-squared 0.9900.
Cumulative incremental outcome against the share targeted. Why its vertical axis scales a difference of response rates into an incremental response count, and where to cut the campaign.
Accuracy 0.8575 and micro F1 0.8575 — and the rarest class had a recall of 0.0382. Macro F1 came out at 0.6922.
A pAUC that normalizes to 0.5 can be ten times better than chance. Where the baseline actually sits, and how to standardize properly.
Five arbitrary re-numberings of the same six categories gave logistic regression 0.8799, 0.3775, 0.6220, 0.6220 and 0.6232. The forest stayed at 0.8799.
Two models can post identical accuracy with opposite error profiles. What the number hides, and what to report beside it.
Weighted precision 0.8071, weighted recall 0.4600, weighted F1 0.3670 — below both, which scikit-learn’s own documentation warns about.