diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-06-28 16:38:40 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-06-28 16:38:40 +0200 |
commit | 7d6d1984b010cd2ddb47f04065c528837b53bfba (patch) | |
tree | eb70595f3e509e9fb1556d1142baf028a5e9542d /lib/cli.py | |
parent | 31a4e67625730f765943e5b60c401d8027a50a96 (diff) |
analyze-log: add --information-gain
Diffstat (limited to 'lib/cli.py')
-rw-r--r-- | lib/cli.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -92,6 +92,15 @@ def print_info_by_name(model, by_name): ) +def print_information_gain_by_name(model, by_name): + for name in model.names: + for attr in model.attributes(name): + print(f"{name} {attr}:") + mutual_information = model.mutual_information(name, attr) + for i, param in enumerate(model.parameters): + print(f" Parameter {param} : {mutual_information[i]:5.2f}") + + def print_analyticinfo(prefix, info): model_function = info.model_function.removeprefix("0 + ") for i in range(len(info.model_args)): @@ -576,6 +585,11 @@ def add_standard_arguments(parser): help="Show benchmark information (number of measurements, parameter values, ...)", ) parser.add_argument( + "--information-gain", + action="store_true", + help="Show information gain of parameters", + ) + parser.add_argument( "--log-level", metavar="LEVEL", choices=["debug", "info", "warning", "error"], |