diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-11-23 09:24:07 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-11-23 09:24:07 +0100 |
commit | fa9405d911d7c6ea4cd3f6b19535f7d13a6f65d2 (patch) | |
tree | 95236624ad37246873a11f8c2ef2cca1efb8d079 /bin | |
parent | 5b5380430eb3b701c1c43e18524a6b4759f46e27 (diff) |
add parameter-aware cross validation
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-archive.py | 6 | ||||
-rwxr-xr-x | bin/analyze-kconfig.py | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index c66570e..f1b9f71 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -477,6 +477,11 @@ if __name__ == "__main__": "Only works with --show-quality=table at the moment.", ) parser.add_argument( + "--parameter-aware-cross-validation", + action="store_true", + help="Perform parameter-aware cross-validation: ensure that parameter values (and not just observations) are mutually exclusive between training and validation sets.", + ) + parser.add_argument( "--with-safe-functions", action="store_true", help="Include 'safe' functions (safe_log, safe_inv, safe_sqrt) which are also defined for 0 and -1. " @@ -655,6 +660,7 @@ if __name__ == "__main__": if xv_method: xv = CrossValidator(PTAModel, by_name, parameters, arg_count) + xv.parameter_aware = args.parameter_aware_cross_validation if args.info: for state in model.states: diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index 55bf53b..d4b87c6 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -99,6 +99,11 @@ def main(): metavar="METHOD:COUNT", ) parser.add_argument( + "--parameter-aware-cross-validation", + action="store_true", + help="Perform parameter-aware cross-validation: ensure that parameter values (and not just observations) are mutually exclusive between training and validation sets.", + ) + parser.add_argument( "--show-model", choices=["static", "paramdetection", "param", "all", "tex", "html"], action="append", @@ -228,6 +233,7 @@ def main(): force_tree=args.force_tree, max_std=max_std, ) + xv.parameter_aware = args.parameter_aware_cross_validation else: xv_method = None |