From 008eb381a07638906cb581839a07c5bcdc204f01 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 13 Oct 2022 16:50:18 +0200 Subject: analyze-kconfig: report MAPE if available --- bin/analyze-kconfig.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bin') 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) -- cgit v1.2.3