MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / _bootstrap_internal

Class _bootstrap_internal

test/general/lm_eval/metrics.py:192–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190
191
192class _bootstrap_internal:
193 def __init__(self, f, n):
194 self.f = f
195 self.n = n
196
197 def __call__(self, v):
198 i, xs = v
199 rnd = random.Random()
200 rnd.seed(i)
201 res = []
202 for _ in range(self.n):
203 res.append(self.f(rnd.choices(xs, k=len(xs))))
204 return res
205
206
207def bootstrap_stderr(f, xs, iters):

Callers 1

bootstrap_stderrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected