diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-13 16:06:30 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-13 16:06:30 +0200 |
commit | 0f59ffb5f2ecb3dc23764cd566d962e483bf31e2 (patch) | |
tree | 01acb783f3bfe9593d7d1353c0677f2702bd98b4 /lib/model.py | |
parent | b4f7b9e9407dbdc3be957fdfc6da0d7755b4b64d (diff) |
analyze-kconfig: add cross-validation support
Diffstat (limited to 'lib/model.py')
-rw-r--r-- | lib/model.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/model.py b/lib/model.py index 590c6f0..06ff25c 100644 --- a/lib/model.py +++ b/lib/model.py @@ -75,6 +75,7 @@ class AnalyticModel: function_override=dict(), use_corrcoef=False, compute_stats=True, + force_tree=False, ): """ Create a new AnalyticModel and compute parameter statistics. @@ -134,6 +135,13 @@ class AnalyticModel: if compute_stats: self._compute_stats(by_name) + if force_tree: + for name in self.names: + for attr in self.by_name[name]["attributes"]: + # TODO specify correct threshold + self.build_dtree(name, attr, 0) + self.fit_done = True + def __repr__(self): names = ", ".join(self.by_name.keys()) return f"AnalyticModel<names=[{names}]>" |