From 1f99db1e77e8b66bb3c461c2ebfc609c64371245 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 24 Aug 2022 14:45:25 +0200 Subject: analyze-kconfig: do not print model error if --show-quality is used --- bin/analyze-kconfig.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index 02fc5a5..2cba18e 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -441,14 +441,15 @@ def main(): [None, param_info, None], ) - print("Model Error on Training Data:") - for name in sorted(model.names): - for attribute, error in sorted( - analytic_quality[name].items(), key=lambda kv: kv[0] - ): - mae = error["mae"] - smape = error["smape"] - print(f"{name:15s} {attribute:20s} ± {mae:10.2} / {smape:5.1f}%") + if not args.show_quality: + print("Model Error on Training Data:") + for name in sorted(model.names): + for attribute, error in sorted( + analytic_quality[name].items(), key=lambda kv: kv[0] + ): + mae = error["mae"] + smape = error["smape"] + print(f"{name:15s} {attribute:20s} ± {mae:10.2} / {smape:5.1f}%") if args.show_model_size: dfatool.cli.print_model_size(model) -- cgit v1.2.3