MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / bootstrap_ci

Function bootstrap_ci

benchmarking/vllm/judge_eval.py:95–101  ·  view source on GitHub ↗

Bootstrap 95% CI for the mean of a binary array. Returns (lo%, hi%).

(arr: np.ndarray, rng: np.random.Generator)

Source from the content-addressed store, hash-verified

93
94
95def bootstrap_ci(arr: np.ndarray, rng: np.random.Generator) -> tuple[float, float]:
96 """Bootstrap 95% CI for the mean of a binary array. Returns (lo%, hi%)."""
97 n = len(arr)
98 idx = rng.integers(0, n, size=(BOOTSTRAP_N, n))
99 means = arr[idx].mean(axis=1)
100 lo, hi = np.percentile(means, [2.5, 97.5])
101 return 100 * lo, 100 * hi
102
103
104def paired_bootstrap(

Callers 1

print_resultsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected