diff options
-rwxr-xr-x | bin/analyze-archive.py | 1 | ||||
-rwxr-xr-x | bin/analyze-kconfig.py | 7 | ||||
-rwxr-xr-x | bin/analyze-log.py | 7 | ||||
-rw-r--r-- | lib/cli.py | 9 |
4 files changed, 11 insertions, 13 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index 25565a5..2f5e680 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -730,6 +730,7 @@ if __name__ == "__main__": static=static_quality, model_info=param_info, xv_method=xv_method, + xv_count=xv_count, error_metric=args.error_metric, ) if args.with_substates: diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index b114999..bc47242 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -526,18 +526,13 @@ def main(): ) if "table" in args.show_quality or "all" in args.show_quality: - if xv_method is not None: - print( - f"Model error ({args.error_metric}) after cross validation ({xv_method}, {xv_count}):" - ) - else: - print(f"Model error ({args.error_metric}) on training data:") dfatool.cli.model_quality_table( lut=lut_quality, model=analytic_quality, static=static_quality, model_info=param_info, xv_method=xv_method, + xv_count=xv_count, error_metric=args.error_metric, ) diff --git a/bin/analyze-log.py b/bin/analyze-log.py index c74e206..be11f5d 100755 --- a/bin/analyze-log.py +++ b/bin/analyze-log.py @@ -223,18 +223,13 @@ def main(): ) if "table" in args.show_quality or "all" in args.show_quality: - if xv_method is not None: - print( - f"Model error ({args.error_metric}) after cross validation ({xv_method}, {xv_count}):" - ) - else: - print(f"Model error ({args.error_metric}) on training data:") dfatool.cli.model_quality_table( lut=lut_quality, model=analytic_quality, static=static_quality, model_info=param_info, xv_method=xv_method, + xv_count=xv_count, error_metric=args.error_metric, ) @@ -181,7 +181,7 @@ def format_quality_measures(result, error_metric="smape", col_len=8): def model_quality_table( - lut, model, static, model_info, xv_method=None, error_metric="smape" + lut, model, static, model_info, xv_method=None, xv_count=None, error_metric="smape" ): key_len = len("Key") attr_len = len("Attribute") @@ -201,6 +201,13 @@ def model_quality_table( else: xv_header = "training" + if xv_method is not None: + print( + f"Model error ({error_metric}) after cross validation ({xv_method}, {xv_count}):" + ) + else: + print(f"Model error ({error_metric}) on training data:") + print( f"""{"":>{key_len}s} {"":>{attr_len}s} {"training":>8s} {xv_header:>8s} {xv_header:>8s}""" ) |