diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-07-28 10:01:40 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-07-28 10:01:40 +0200 |
commit | 5312f01724edad7ef380ded9a6e34971b56c7939 (patch) | |
tree | 36b093e5ac66585c347389447bb55fa69f258891 /lib | |
parent | fadfb6c5203a3fb048786a2c1e494b7cc46496e8 (diff) |
model: improve error message
Diffstat (limited to 'lib')
-rw-r--r-- | lib/model.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/model.py b/lib/model.py index cafbf2c..345dea5 100644 --- a/lib/model.py +++ b/lib/model.py @@ -347,6 +347,8 @@ class AnalyticModel: :returns: SplitFunction or StaticFunction """ + # TODO remove data entries which are None (and remove corresponding parameters, too!) + parameter_names = self.parameters if len(parameter_names) == 0 or np.std(data) < threshold: return StaticFunction(np.mean(data)) @@ -389,7 +391,9 @@ class AnalyticModel: if np.all(np.isinf(mean_stds)): # all children have the same configuration. We shouldn't get here due to the threshold check above... - logging.warning("Waht") + logging.warning( + f"While building DTree for configurations {parameters}: Children have identical configuration, but high stddev ({np.std(data)}). Falling back to Staticfunction" + ) return StaticFunction(np.mean(data)) symbol_index = np.argmin(mean_stds) |