diff --git a/python-modules/molkrr/krr.py b/python-modules/molkrr/krr.py index f4bf16ac9165c7d92ac8054d4ab411b4c5805f97..5d149523732ba6d78bfabde318119766f511be6a 100644 --- a/python-modules/molkrr/krr.py +++ b/python-modules/molkrr/krr.py @@ -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): diff --git a/python-modules/molkrr/ml_chemical_space.bkr b/python-modules/molkrr/ml_chemical_space.bkr index 8c96bf0be28e37d6ae89ac8b92f62b9f0c89f28e..1432ff4f709cdda99b9cea4ee29a7393239d63b7 100644 --- a/python-modules/molkrr/ml_chemical_space.bkr +++ b/python-modules/molkrr/ml_chemical_space.bkr @@ -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]});", "}",