summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-03-17 14:59:26 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2022-03-17 14:59:26 +0100
commit5ca002107d4fb1ff989a1fa645169018b31e531a (patch)
tree4c1ab5f7a152c65ecfecf0e3e4b5b85bcbd7ba7b /lib
parent228c7dc09d936db1a6a6d976d5bb99148494eb7c (diff)
dtree: only compute by_param if ignore_irrelevant_parameters is set
Diffstat (limited to 'lib')
-rw-r--r--lib/parameters.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/parameters.py b/lib/parameters.py
index d83ff85..1cbc5af 100644
--- a/lib/parameters.py
+++ b/lib/parameters.py
@@ -1174,12 +1174,13 @@ class ModelAttribute:
loss = list()
ffs_feasible = False
- by_param = partition_by_param(data, parameters)
- distinct_values_by_param_index = distinct_param_values(
- parameters
- ) # required, "unique_values" in for loop is insufficient for std_by_param foo
- std_static = np.std(data)
- std_lut = np.mean([np.std(v) for v in by_param.values()])
+ if ignore_irrelevant_parameters:
+ by_param = partition_by_param(data, parameters)
+ distinct_values_by_param_index = distinct_param_values(
+ parameters
+ ) # required, "unique_values" in for loop is insufficient for std_by_param foo
+ std_static = np.std(data)
+ std_lut = np.mean([np.std(v) for v in by_param.values()])
for param_index in range(param_count):
if param_index in self.ignore_param: