diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-07-01 11:02:49 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-07-01 11:02:49 +0200 |
commit | f1dfa367044344760331d79361363ba1860f2367 (patch) | |
tree | 3bab6fa0fbbca5508cfc610d332cdbf900144319 /bin | |
parent | 40642f6127d2961a10c9cde5c7fa18cdb55b97e9 (diff) |
mutual_information: handle skipped parameters; return a dict
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-log.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/analyze-log.py b/bin/analyze-log.py index 50c0344..43a7d11 100755 --- a/bin/analyze-log.py +++ b/bin/analyze-log.py @@ -286,10 +286,11 @@ def main(): for name in model.names: for attr in model.attributes(name): mutual_information = model.mutual_information(name, attr) - for i, param in enumerate(model.parameters): - dref[f"mutual information/{name}/{attr}/{param}"] = ( - mutual_information[i] - ) + for param in model.parameters: + if param in mutual_information: + dref[f"mutual information/{name}/{attr}/{param}"] = ( + mutual_information[param] + ) dfatool.cli.export_dataref( args.export_dref, dref, precision=args.dref_precision |