Complete excel totals and ignore xlsx in git

This commit is contained in:
2021-06-09 18:33:59 +02:00
parent 5f3d1e00ed
commit 44b44f33ad
2 changed files with 9 additions and 3 deletions

1
.gitignore vendored
View File

@@ -139,3 +139,4 @@ table.tex
report.csv
data/csv/*
data/oc1output/*
*.xlsx

View File

@@ -294,7 +294,7 @@ def excel_status(status):
return " ", ""
def excel_write_totals(book, sheet, totals, start):
def excel_write_totals(book, sheet, totals, start, accuracy_total):
i = 2
bold = book.add_format({"bold": True, "font_size": 16})
for key, total in totals.items():
@@ -303,8 +303,13 @@ def excel_write_totals(book, sheet, totals, start):
sheet.write(excel_write_line.row + i, 2, total, bold)
sheet.write(excel_write_line.row + i, 3, text, bold)
i += 1
message = (
f"** Accuracy compared to stree_default (liblinear-ovr) .: "
f"{accuracy_total/40.282203:7.4f}"
)
sheet.write(excel_write_line.row + i + 1, 0, message, bold)
time_spent = get_time(start, time.time())
sheet.write(excel_write_line.row + i + 1, 0, time_spent, bold)
sheet.write(excel_write_line.row + i + 3, 0, time_spent, bold)
def compute_status(dbh, name, model, accuracy):
@@ -461,7 +466,7 @@ if dataset == "all":
f"{accuracy_total/40.282203:7.4f}"
)
if excel != "":
excel_write_totals(excel_wb, excel_ws, totals, start)
excel_write_totals(excel_wb, excel_ws, totals, start, accuracy_total)
excel_wb.close()
else:
scores, times, hyperparameters, nodes, leaves, depth = process_dataset(