summaryrefslogtreecommitdiff
path: root/bin
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
parent2c5bcd77f2c952cc5269ca3e4b6e0a7323ebd085 (diff)
store decision tree attributes of xv models in dataref export
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-archive.py18
-rwxr-xr-xbin/analyze-kconfig.py18
2 files changed, 30 insertions, 6 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index 0a2845c..5f6be9a 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -935,11 +935,16 @@ if __name__ == "__main__":
)
if xv_method == "montecarlo":
- 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
+ )
elif xv_method == "kfold":
- 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
+ )
else:
analytic_quality = model.assess(param_model)
+ xv_analytic_models = None
if "tex" in show_models or "tex" in show_quality:
print_text_model_data(
@@ -1053,7 +1058,14 @@ if __name__ == "__main__":
if args.export_dref:
dref = raw_data.to_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:
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: