summaryrefslogtreecommitdiff
path: root/bin/analyze-kconfig.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-01-05 15:56:24 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2022-01-05 15:56:24 +0100
commit6e2fa5f36deb9882e5bddb212695434c219c3d94 (patch)
tree0c47200b6112076d5ae2ce3e58a45a060783b0e2 /bin/analyze-kconfig.py
parent2c5bcd77f2c952cc5269ca3e4b6e0a7323ebd085 (diff)
store decision tree attributes of xv models in dataref export
Diffstat (limited to 'bin/analyze-kconfig.py')
-rwxr-xr-xbin/analyze-kconfig.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index 048c8c9..684d6b3 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -238,7 +238,9 @@ def main():
if xv_method == "montecarlo":
static_quality, _ = xv.montecarlo(lambda m: m.get_static(), xv_count)
- analytic_quality, _ = xv.montecarlo(lambda m: m.get_fitted()[0], xv_count)
+ analytic_quality, xv_analytic_models = xv.montecarlo(
+ lambda m: m.get_fitted()[0], xv_count
+ )
if lut_model:
lut_quality, _ = xv.montecarlo(
lambda m: m.get_param_lut(fallback=True), xv_count
@@ -247,7 +249,9 @@ def main():
lut_quality = None
elif xv_method == "kfold":
static_quality, _ = xv.kfold(lambda m: m.get_static(), xv_count)
- analytic_quality, _ = xv.kfold(lambda m: m.get_fitted()[0], xv_count)
+ analytic_quality, xv_analytic_models = xv.kfold(
+ lambda m: m.get_fitted()[0], xv_count
+ )
if lut_model:
lut_quality, _ = xv.kfold(
lambda m: m.get_param_lut(fallback=True), xv_count
@@ -257,6 +261,7 @@ def main():
else:
static_quality = model.assess(static_model)
analytic_quality = model.assess(param_model)
+ xv_analytic_models = none
if lut_model:
lut_quality = model.assess(lut_model)
else:
@@ -324,7 +329,14 @@ def main():
static_quality = model.assess(static_model)
if args.export_dref:
- dref.update(model.to_dref(static_quality, lut_quality, analytic_quality))
+ dref.update(
+ model.to_dref(
+ static_quality,
+ lut_quality,
+ analytic_quality,
+ xv_models=xv_analytic_models,
+ )
+ )
dref["constructor duration"] = (constructor_duration, r"\second")
dref["regression duration"] = (fit_duration, r"\second")
with open(args.export_dref, "w") as f: