Fix some mistakes

Add complexity to crossval
Change header of tex file
Add complexity fields to report_score
Add commented final date in database
This commit is contained in:
2021-04-08 08:32:22 +02:00
parent a23bae6b52
commit e592a33962
5 changed files with 43 additions and 70 deletions

View File

@@ -182,6 +182,13 @@ class Experiment:
),
sort_keys=True,
)
if type(model).__name__ == "Stree":
best_model = grid_search.best_estimator_
nodes, leaves = best_model.nodes_leaves()
depth = best_model.depth_
else:
nodes = leaves = depth = 0
complexity = dict(nodes=nodes, leaves=leaves, depth=depth)
hyperparams.store(
dataset,
time_spent,
@@ -190,6 +197,7 @@ class Experiment:
normalize,
standardize,
grid_type,
complexity,
)
if self._num_warnings > 0:
print(f"{self._num_warnings} warnings have happend")