Commit a700fda0 authored by Ask Hjorth Larsen's avatar Ask Hjorth Larsen
Browse files

attempt to round displayed numbers

parent eb917c65
......@@ -32,7 +32,7 @@ def timer(name):
tstart = time()
yield
tstop = time()
print('Time {}: {}s'.format(name, tstop - tstart))
print('Time {}: {:1.3}s'.format(name, tstop - tstart))
def gen_random_index(nsystems, ntestsystems, seed=0):
......
......@@ -637,23 +637,23 @@
" //def devi = variance / (ntestsys);",
" //y: [min_values.min(), max_values.max()], x: [min_values.min(), max_values.max()],",
" ref_pred_plot << new Line(y: [0,10], x: [0,10],",
" displayName:\"Ideal (R=P).\",",
" toolTip: {xs, ys -> \"MAE: \" + mae + \" eV\"});",
" displayName:\"Ideal (R=P).\",",
" toolTip: {xs, ys -> \"MAE: \" + mae.round(3) + \" eV\"});",
" ref_pred_plot << new Area(y: [min_values.min() + mae, max_values.max() + mae], ",
" x: [min_values.min(), max_values.max()], ",
" base: [min_values.min() - mae, max_values.max() - mae], ",
" color: new Color(255, 0, 0, 50), ",
" displayName: \"MAE: \" + mae )",
" displayName: \"MAE: \" + mae.rount(3) )",
" ref_pred_plot << new Area(y: [min_values.min() + (mae +devi), max_values.max() + (mae+devi)], ",
" x: [min_values.min(), max_values.max()], ",
" base: [min_values.min() - (mae+devi), max_values.max() - (mae+devi)], ",
" color: new Color(255, 0, 0, 50), ",
" displayName: \"Standard deviation: \" + devi)",
" displayName: \"Standard deviation: \" + devi.round(3))",
" ref_pred_plot << new Points(x:ref_values, y: prediction,",
" color: Color.blue,",
" displayName:out_put_label + \" values\",",
" toolTip: {xs, ys, h -> \"real_value = \" + xs + ",
" \", predicted_value = \" + ys + ",
" toolTip: {xs, ys, h -> \"real_value = \" + xs.round(3) + ",
" \", predicted_value = \" + ys.round(3) + ",
" \", molecule = \" + ",
" outfile_data[h][2]});",
"}",
......
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