From 5312f01724edad7ef380ded9a6e34971b56c7939 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 28 Jul 2021 10:01:40 +0200 Subject: model: improve error message --- lib/model.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3