diff options
-rwxr-xr-x | bin/analyze-kconfig.py | 7 | ||||
-rw-r--r-- | lib/model.py | 19 |
2 files changed, 24 insertions, 2 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index 4a71617..ffe7648 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -134,7 +134,12 @@ def main(): raise NotImplementedError() if args.info: - print("TODO") + for name in model.names: + print(f"{name}:") + print(f""" Number of Measurements: {len(by_name[name]["param"])}""") + for i, param in enumerate(model.parameters): + param_values = model.distinct_param_values_by_name[name][i] + print(f" Parameter {param} ∈ {param_values}") if args.export_tree: with open("nfpkeys.json", "r") as f: diff --git a/lib/model.py b/lib/model.py index 3f784cc..590c6f0 100644 --- a/lib/model.py +++ b/lib/model.py @@ -5,7 +5,12 @@ import numpy as np import os from .automata import PTA, ModelAttribute from .functions import StaticFunction, SubstateFunction, SplitFunction -from .parameters import ParallelParamStats, ParamStats, codependent_param_dict +from .parameters import ( + ParallelParamStats, + ParamStats, + codependent_param_dict, + distinct_param_values, +) from .paramfit import ParamFit from .utils import soft_cast_int, by_name_to_by_param, regression_measures @@ -118,6 +123,12 @@ class AnalyticModel: if self._num_args is None: self._num_args = _num_args_from_by_name(by_name) + self.distinct_param_values_by_name = dict() + for name in self.names: + self.distinct_param_values_by_name[name] = distinct_param_values( + by_name[name]["param"] + ) + self.fit_done = False if compute_stats: @@ -535,6 +546,12 @@ class PTAModel(AnalyticModel): self.pta = pta self.ignore_trace_indexes = ignore_trace_indexes + self.distinct_param_values_by_name = dict() + for name in self.names: + self.distinct_param_values_by_name[name] = distinct_param_values( + by_name[name]["param"] + ) + self.fit_done = False if traces is not None and pelt is not None: |