summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-10-08 15:10:48 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-10-08 15:10:48 +0200
commitaa620d777c7fa4d09eea45a1cf18c64c9716af8f (patch)
treee9ecdaa20a56d4a441f556062b0dc441dcef2539 /bin
parent00cc8549745df8eaac04eb98b5ab80933ae7dadf (diff)
analyze-kconfig: show expected model performance
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-kconfig.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index da97c58..6887489 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -118,6 +118,17 @@ def main():
for attr in model.by_name[name]["attributes"]:
# TODO specify correct threshold
model.build_dtree(name, attr, 20)
+ model.fit_done = True
+
+ param_model, param_info = model.get_fitted()
+ analytic_quality = model.assess(param_model)
+
+ print("Model Error on Training Data:")
+ for name in model.names:
+ for attribute, error in analytic_quality[name].items():
+ mae = error["mae"]
+ smape = error["smape"]
+ print(f"{name:15s} {attribute:20s} ± {mae:5.0} / {smape:5.1f}%")
else:
raise NotImplementedError()