diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-01-18 10:45:12 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-01-18 10:45:12 +0100 |
commit | 548534dfe99e0235962ff72c97762f939290b404 (patch) | |
tree | 406594ace29a81befd3cf9c4c1d42c3b5cb25e8d /lib | |
parent | cde0ac4f188bf8f633372fcafab2c0fb7bdaf87b (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parameters.py | 9 |
1 files changed, 7 insertions, 2 deletions
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 |