summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-07-01 11:02:49 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-07-01 11:02:49 +0200
commitf1dfa367044344760331d79361363ba1860f2367 (patch)
tree3bab6fa0fbbca5508cfc610d332cdbf900144319 /bin
parent40642f6127d2961a10c9cde5c7fa18cdb55b97e9 (diff)
mutual_information: handle skipped parameters; return a dict
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-log.py9
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