From 05ef7cf244c84be698cdf83c5e18104d4ed5dc70 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Feb 2022 16:09:05 +0100 Subject: move --info to cli as well --- lib/cli.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'lib') diff --git a/lib/cli.py b/lib/cli.py index 7995fc7..1ee1f33 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -29,6 +29,34 @@ def print_static(model, static_model, name, attribute): ) +def print_info_by_name(model, by_name): + for name in model.names: + attr = list(model.attributes(name))[0] + print(f"{name}:") + print(f""" Number of Measurements: {len(by_name[name][attr])}""") + for param in model.parameters: + print( + " Parameter {} ∈ {}".format( + param, + model.attr_by_name[name][attr].stats.distinct_values_by_param_name[ + param + ], + ) + ) + if name in model._num_args: + for i in range(model._num_args[name]): + print( + " Argument {} ∈ {}".format( + i, + model.attr_by_name[name][ + attr + ].stats.distinct_values_by_param_index[ + len(model.parameters) + i + ], + ) + ) + + def print_analyticinfo(prefix, info): empty = "" print(f"{prefix}: {info.model_function}") -- cgit v1.2.3