mirror of https://gitlab.com/pamhyr/pamhyr2
Ensemble: Keep results nim, mean and max for each run.
parent
7ef7bc13dc
commit
77d56b8bec
|
|
@ -1627,6 +1627,14 @@ class Mage8(Mage):
|
||||||
res["q_min"] = q
|
res["q_min"] = q
|
||||||
res["q_max"] = q
|
res["q_max"] = q
|
||||||
|
|
||||||
|
res["res_z_min"] = [(run_number, np.min(z, axis=0))]
|
||||||
|
res["res_z_mean"] = [(run_number, np.mean(z, axis=0))]
|
||||||
|
res["res_z_max"] = [(run_number, np.max(z, axis=0))]
|
||||||
|
|
||||||
|
res["res_q_min"] = [(run_number, np.min(q, axis=0))]
|
||||||
|
res["res_q_mean"] = [(run_number, np.mean(q, axis=0))]
|
||||||
|
res["res_q_max"] = [(run_number, np.max(q, axis=0))]
|
||||||
|
|
||||||
# FIXME: Keep all results ?
|
# FIXME: Keep all results ?
|
||||||
res["traces"] = [(run_number, tables)]
|
res["traces"] = [(run_number, tables)]
|
||||||
else:
|
else:
|
||||||
|
|
@ -1640,6 +1648,15 @@ class Mage8(Mage):
|
||||||
res["q_min"] = np.minimum(q, res["q_min"])
|
res["q_min"] = np.minimum(q, res["q_min"])
|
||||||
res["q_max"] = np.maximum(q, res["q_max"])
|
res["q_max"] = np.maximum(q, res["q_max"])
|
||||||
|
|
||||||
|
# Keep results min, mean and max
|
||||||
|
res["res_z_min"].append((run_number, np.min(z, axis=0)))
|
||||||
|
res["res_z_mean"].append((run_number, np.mean(z, axis=0)))
|
||||||
|
res["res_z_max"].append((run_number, np.max(z, axis=0)))
|
||||||
|
|
||||||
|
res["res_q_min"].append((run_number, np.min(q, axis=0)))
|
||||||
|
res["res_q_mean"].append((run_number, np.mean(q, axis=0)))
|
||||||
|
res["res_q_max"].append((run_number, np.max(q, axis=0)))
|
||||||
|
|
||||||
# FIXME: Keep all results ?
|
# FIXME: Keep all results ?
|
||||||
res["traces"].append((run_number, tables))
|
res["traces"].append((run_number, tables))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -545,6 +545,16 @@ class SolverLogEnsWindow(SolverLogWindow):
|
||||||
table["z_max"] = results.new_table_data("z_max", tables["z_max"])
|
table["z_max"] = results.new_table_data("z_max", tables["z_max"])
|
||||||
table["q_max"] = results.new_table_data("q_max", tables["q_max"])
|
table["q_max"] = results.new_table_data("q_max", tables["q_max"])
|
||||||
|
|
||||||
|
for key in ["z", "q"]:
|
||||||
|
for func in ["min", "mean", "max"]:
|
||||||
|
name = f"res_{key}_{func}"
|
||||||
|
table[name] = results.new_table_data(
|
||||||
|
name,
|
||||||
|
np.array(
|
||||||
|
list(map(lambda e: e[1], tables[name]))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
for nb, data in tables["traces"]:
|
for nb, data in tables["traces"]:
|
||||||
name = f"{nb}_"
|
name = f"{nb}_"
|
||||||
table[name + "z"] = results.new_table_data(name + "z", data["Z"])
|
table[name + "z"] = results.new_table_data(name + "z", data["Z"])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue