summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-05-10 11:57:08 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-05-10 11:57:08 +0200
commit3e2ee9c52da638c9f92419d2f851e73323efb7e0 (patch)
tree7f760d045d8f3d0351bca5991c50be0bd8d7c3e5
parentc63fc412900fa4a2ee41f776461958f896f857f5 (diff)
analyze-config: correctly map param indexes to param names
-rwxr-xr-xbin/analyze-config.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/analyze-config.py b/bin/analyze-config.py
index c961467..add759c 100755
--- a/bin/analyze-config.py
+++ b/bin/analyze-config.py
@@ -170,26 +170,21 @@ def main():
symbol_index = np.argmin(mean_stds)
symbol = this_symbols[symbol_index]
- new_symbols = this_symbols[:symbol_index] + this_symbols[symbol_index + 1 :]
unique_values = list(set(map(lambda vrr: vrr[0][symbol_index], this_data)))
child = dict()
for value in unique_values:
- children = filter(lambda vrr: vrr[0][symbol_index] == value, this_data)
children = list(
- map(
- lambda x: (x[0][:symbol_index] + x[0][symbol_index + 1 :], *x[1:]),
- children,
- )
+ filter(lambda vrr: vrr[0][symbol_index] == value, this_data)
)
if len(children):
print(
f"Level {level} split on {symbol} == {value} has {len(children)} children"
)
child[value] = get_min(
- new_symbols, children, data_index, threshold, level + 1
+ this_symbols, children, data_index, threshold, level + 1
)
assert len(child.values()) >= 2