summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-07-28 10:01:40 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-07-28 10:01:40 +0200
commit5312f01724edad7ef380ded9a6e34971b56c7939 (patch)
tree36b093e5ac66585c347389447bb55fa69f258891 /lib
parentfadfb6c5203a3fb048786a2c1e494b7cc46496e8 (diff)
model: improve error message
Diffstat (limited to 'lib')
-rw-r--r--lib/model.py6
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)