From 548534dfe99e0235962ff72c97762f939290b404 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 18 Jan 2024 10:45:12 +0100 Subject: build_dtree: do not ignore codependent parameters Ignore non-numeric function arguments instead. Strings arguments are often paired with a length indicater and we are only interested in the latter. --- lib/parameters.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/parameters.py b/lib/parameters.py index ffbbe70..b5bd53a 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -1196,7 +1196,8 @@ class ModelAttribute: :returns: ModelFunction """ - param_count = len(self.param_names) + self.arg_count + nonarg_count = len(self.param_names) + param_count = nonarg_count + self.arg_count # TODO eigentlich muss threshold hier auf Basis der aktuellen Messdatenpartition neu berechnet werden if param_count == 0 or np.std(data) <= threshold: return df.StaticFunction(np.mean(data)) @@ -1229,7 +1230,11 @@ class ModelAttribute: ffs_unsuitable_params.append(param_index) for param_index in range(param_count): - if param_index in self.ignore_codependent_param: + if ( + param_index >= nonarg_count + and self.param_type[param_index] == ParamType.ENUM + ): + # do not split on non-numeric function arguments loss.append(np.inf) continue -- cgit v1.2.3