diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-07-02 11:50:50 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-07-02 11:50:50 +0200 |
commit | 67dac4687d0be2b9125dd815c18da0c516e8658e (patch) | |
tree | 2ae73a6a96ad45193c159c436cb86f4a111407fc /lib | |
parent | f517ddf6670ef8e8d655ed9e922deeeb1e07f599 (diff) |
model JSON export: Include parameter values that contributed to this model
Diffstat (limited to 'lib')
-rw-r--r-- | lib/model.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/model.py b/lib/model.py index a221d47..2815830 100644 --- a/lib/model.py +++ b/lib/model.py @@ -625,11 +625,17 @@ class AnalyticModel: ret = { "parameters": self.parameters, "name": dict([[name, dict()] for name in self.names]), + "paramValuesbyName": dict([[name, dict()] for name in self.names]), } for name in self.names: for attr_name, attr in self.attr_by_name[name].items(): ret["name"][name][attr_name] = attr.to_json(**kwargs) + attr_name = list(self.attributes(name))[0] + for param_name in self.parameters: + ret["paramValuesbyName"][name][param_name] = self.attr_by_name[name][ + attr_name + ].stats.distinct_values_by_param_name[param_name] return ret |