Skip to content

Evaluation, diagnostics, benchmarks, and additional tests · Evaluation, diagnostics, benchmarks, and additional hypothesis tests · EVA053 · Diagnostic

Paired bootstrap for model-comparison uncertainty

Quantifies sampling uncertainty in a difference between systems evaluated on the same units.

Runs in CodeSplash Complete calculation CodeSplash's run and the reference's record

In CodeSplash

A CodeSplash method runs this entry in Python and R. Set it up from the method's page.

Do it in CodeSplash Run it on your own data, in Python or R.

Availability
Runs in CodeSplash
Code example
Complete calculation
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
Verified in Python and R through bootstrap.ci, evaluate.paired_metric, evaluate.text. The reference's example ran here in one language.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Quantifies sampling uncertainty in a difference between systems evaluated on the same units.

Question / hypotheses

How variable would the observed performance difference be under resampling of the target sampling units?

Architecture / computational structure

A fixed scoring/calibration pipeline applied to model outputs or supplied observations; the formula and usage sections identify its operations.

Assumptions

Pairs must be retained. Resample independent units such as patients, documents, speakers, or source videos rather than correlated tokens or frames. The bootstrap approximation needs a suitable sampling regime.

Formula / computational definition

Δb∗=M(A;Ib)−M(B;Ib),CI=[Qα/2(Δ∗),Q1−α/2(Δ∗)].\Delta_b^*=M(A;I_b)-M(B;I_b),\quad CI=[Q_{\alpha/2}(\Delta^*),Q_{1-\alpha/2}(\Delta^*)].

Parameters and notation

I_b is a resampled index set; B resamples and interval type are hyperparameters. Percentile, basic, and BCa intervals differ; nonlinear corpus metrics must be recomputed per resample.

Fitting, fine-tuning, and adaptation

There is no model fine-tuning step for this evaluation procedure. Freeze the evaluated systems and evaluator before the final test. Select evaluation settings on development data; if a learned evaluator or calibration model is adapted, use separate fitting data, version it, and reassess its validity.

How to use and calibrate

Prespecify the main metric, calculate a paired effect, resample complete units, and report the interval with the number of independent units.

Example application

Estimate uncertainty in a WER difference by resampling speakers and recomputing total errors/reference words.

Interpretation / pitfalls

Watch out

Overlapping cross-validation folds and seed variation are not interchangeable with independent test units. A percentile interval is not automatically an exact hypothesis test.

Python and R code examples

Scope: Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.

Validation: Python — Executed successfully on synthetic inputs. R — reviewed but not executed in this environment. Python dependencies are explicit imports; R uses base R unless a package/bridge is explicitly named.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline. · needs numpy

import numpy as np
d=np.array([.1,.2,-.05,.15,.08]); rng=np.random.default_rng(7)
means=np.mean(d[rng.integers(0,len(d),(1000,len(d)))],axis=1)
print(np.quantile(means,[.025,.975]))
R

Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.

set.seed(7); d <- c(.1,.2,-.05,.15,.08)
means <- replicate(1000,mean(sample(d,length(d),replace=TRUE)))
print(quantile(means,c(.025,.975)))

Sources

From the CodeSplash reference, entry EVA053.