Commit 1987b989 authored by jonathan.froehlich's avatar jonathan.froehlich
Browse files

Updated evaluation

parent 17a6ed1a
......@@ -31,14 +31,16 @@ def generate_table(name, lists):
values.update({str(i): lists[i]})
errors = [0 for _ in range(len(lists))]
refvalue=0
for n in range(N):
refvalue += 1/N * lists[-1][n] * lists[-1][n]
for i in range(len(lists) - 1):
errors[i] += 1/N * (lists[i][n] - lists[-1][n])*(lists[i][n] - lists[-1][n])
errorstring = name+"Errors "
ratestring = name+"Rates "
for i in range(len(lists) - 1):
errors[i] = sqrt(errors[i])
errors[i] = sqrt(errors[i]) / sqrt(refvalue)
errorstring += "& $" + str(round(errors[i], 6))+ "$ "
if i>0:
ratestring += "& $" + str(round(errors[i-1] / errors[i], 2)) + "$ "
......
......@@ -31,14 +31,18 @@ def generate_table(name, lists):
values.update({str(i): lists[i]})
errors = [0 for _ in range(len(lists))]
refvalue = 0
for n in range(N):
refvalue += 1/N * lists[-1][n] * lists[-1][n]
for i in range(len(lists)-1):
errors[i] += 1/N * (lists[i][n] - lists[-1][n])*(lists[i][n] - lists[-1][n])
errorstring = name+"Errors "
ratestring = name+"Rates "
for i in range(len(lists) - 1):
errors[i] = sqrt(errors[i])
errors[i] = sqrt(errors[i]) / sqrt(refvalue)
errorstring += "& $" + str(round(errors[i], 6))+ "$ "
if i>0:
ratestring += "& $" + str(round(errors[i-1] / errors[i],2)) + "$ "
......
Supports Markdown
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