From 2d7e1007192229b70d52c1f04f7114f984f17002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Mon, 10 Feb 2020 09:49:33 +0100 Subject: Use stdddev instead of variance. --- sampling_alg_lac2020/LAC-20.tex | 2 +- sampling_alg_lac2020/figures/selection_count/calc_stats.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sampling_alg_lac2020/LAC-20.tex b/sampling_alg_lac2020/LAC-20.tex index cbbcb17..47c3d4f 100644 --- a/sampling_alg_lac2020/LAC-20.tex +++ b/sampling_alg_lac2020/LAC-20.tex @@ -634,7 +634,7 @@ Without the smart search optimization described at the end of Section \ref{sec:i experiment & sweep & 16 & 48 & 80 & 112 \\ \hline mean evaluations & 6.81 & 13.99 & 12.93 & 10.88 & 4.00 \\ -variance evaluations & 6.09 & 0.04 & 2.34 & 0.25 & 0.00 \\ +stddev evaluations & 2.47 & 0.19 & 1.53 & 0.50 & 0.00 \\ \hline \end{tabular} \end{table} diff --git a/sampling_alg_lac2020/figures/selection_count/calc_stats.py b/sampling_alg_lac2020/figures/selection_count/calc_stats.py index b192b72..9d9ac84 100755 --- a/sampling_alg_lac2020/figures/selection_count/calc_stats.py +++ b/sampling_alg_lac2020/figures/selection_count/calc_stats.py @@ -1,5 +1,6 @@ #!/usr/bin/python3 import sys +import math # if len(sys.argv) != 2: # print("Wrong number of arguments.") @@ -14,6 +15,6 @@ for input_file in files: X = [int(i) for i in f.readlines()] mean = float(sum(X))/len(X) - stddev = float(sum([x**2 for x in X]))/len(X) - mean**2 + stddev = math.sqrt(float(sum([x**2 for x in X]))/len(X) - mean**2) print("{0:.2f}".format(mean) + " " + "{0:.2f}".format(stddev)) -- cgit v1.2.3