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

Update metrics.py

parent 0d9cc5a8
...@@ -170,7 +170,7 @@ def _sacreformat(refs, preds): ...@@ -170,7 +170,7 @@ def _sacreformat(refs, preds):
## stderr stuff ## stderr stuff
def bootstrap_stddev(f, xs, iters=10000): def bootstrap_stderr(f, xs, iters=10000):
rnd = random.Random() rnd = random.Random()
rnd.seed(42) rnd.seed(42)
res = [] res = []
...@@ -196,7 +196,7 @@ def stderr_for_metric(metric): ...@@ -196,7 +196,7 @@ def stderr_for_metric(metric):
] ]
if metric in bootstrappable: if metric in bootstrappable:
return lambda x: bootstrap_stddev(metric, x) / math.sqrt(len(x)) return lambda x: bootstrap_stderr(metric, x)
stderr = { stderr = {
mean: mean_stderr, mean: mean_stderr,
......
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