Unverified Commit 0d9cc5a8 authored by Leo Gao's avatar Leo Gao Committed by GitHub
Browse files

Update metrics.py

parent 45fefe9f
......@@ -178,10 +178,10 @@ def bootstrap_stddev(f, xs, iters=10000):
print("bootstrapping for stddev:", f.__name__)
for i in trange(iters):
# sample w replacement
bootstrap = rnd.choices(xs, k=len(xs))
res.append(stddev(bootstrap))
bootstrap = f(rnd.choices(xs, k=len(xs)))
res.append(bootstrap)
return mean(res)
return stddev(res)
def stderr_for_metric(metric):
......@@ -204,4 +204,4 @@ def stderr_for_metric(metric):
}
return stderr.get(metric, None)
\ No newline at end of file
return stderr.get(metric, None)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment