diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-10-13 16:50:18 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-10-13 16:50:18 +0200 |
commit | 008eb381a07638906cb581839a07c5bcdc204f01 (patch) | |
tree | f0125f573fabdc49e5c10fa8fd88c1cd4783f92e /bin/analyze-kconfig.py | |
parent | 60700fa5456f91bc532fe72dddb061a723ffe52f (diff) |
analyze-kconfig: report MAPE if available
Diffstat (limited to 'bin/analyze-kconfig.py')
-rwxr-xr-x | bin/analyze-kconfig.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index c33292e..692d950 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -510,8 +510,14 @@ def main(): analytic_quality[name].items(), key=lambda kv: kv[0] ): mae = error["mae"] + mape = error["mape"] smape = error["smape"] - print(f"{name:15s} {attribute:20s} ± {mae:10.2} / {smape:5.1f}%") + if mape is not None: + print(f"{name:15s} {attribute:20s} ± {mae:10.2} / {mape:5.1f}%") + else: + print( + f"{name:15s} {attribute:20s} ± {mae:10.2} / {smape:5.1f}% SMAPE" + ) if args.show_model_size: dfatool.cli.print_model_size(model) |