From 7b564fc3f766c2428ba70a449c12024607f555a7 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 27 Nov 2023 13:22:51 +0100 Subject: --info: also print range of observations --- lib/cli.py | 8 ++++++++ lib/parameters.py | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'lib') diff --git a/lib/cli.py b/lib/cli.py index 0114423..0f35f88 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -63,6 +63,14 @@ def print_info_by_name(model, by_name): ], ) ) + for attr in sorted(model.attributes(name)): + print( + " Observation {} ∈ [{:.2f}, {:.2f}]".format( + attr, + model.attr_by_name[name][attr].min(), + model.attr_by_name[name][attr].max(), + ) + ) def print_analyticinfo(prefix, info): diff --git a/lib/parameters.py b/lib/parameters.py index 99418b6..4c7cf8b 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -742,6 +742,12 @@ class ModelAttribute: ) return None + def min(self): + return np.min(self.data) + + def max(self): + return np.max(self.data) + def webconf_function_map(self): return self.model_function.webconf_function_map() -- cgit v1.2.3