summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2023-11-27 13:22:51 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2023-11-27 13:22:51 +0100
commit7b564fc3f766c2428ba70a449c12024607f555a7 (patch)
treecf63693295444d898d3bb5dd87995f560f699b8f /lib
parent0e8b4db2964d82a2856bca096fafbe86b76712eb (diff)
--info: also print range of observations
Diffstat (limited to 'lib')
-rw-r--r--lib/cli.py8
-rw-r--r--lib/parameters.py6
2 files changed, 14 insertions, 0 deletions
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()