summaryrefslogtreecommitdiff
path: root/lib/validation.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-11-24 15:16:26 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2021-11-24 15:16:26 +0100
commit7e07dfbe880e380b95586ce9eb32bf80f14736c1 (patch)
tree0c0414fdb1f6d7f52efe010bba53ecbd7178b608 /lib/validation.py
parentfa9405d911d7c6ea4cd3f6b19535f7d13a6f65d2 (diff)
validation: add SMAPE output
Diffstat (limited to 'lib/validation.py')
-rw-r--r--lib/validation.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/validation.py b/lib/validation.py
index 81b1819..47395dc 100644
--- a/lib/validation.py
+++ b/lib/validation.py
@@ -218,6 +218,7 @@ class CrossValidator:
ret[name][attribute] = {
"mae_list": list(),
"rmsd_list": list(),
+ "mape_list": list(),
"smape_list": list(),
}
@@ -225,14 +226,14 @@ class CrossValidator:
res = self._single_xv(model_getter, training_and_validation_by_name)
for name in self.names:
for attribute in self.by_name[name]["attributes"]:
- for measure in ("mae", "rmsd", "smape"):
+ for measure in ("mae", "rmsd", "mape", "smape"):
ret[name][attribute][f"{measure}_list"].append(
res[name][attribute][measure]
)
for name in self.names:
for attribute in self.by_name[name]["attributes"]:
- for measure in ("mae", "rmsd", "smape"):
+ for measure in ("mae", "rmsd", "mape", "smape"):
ret[name][attribute][measure] = np.mean(
ret[name][attribute][f"{measure}_list"]
)