mirror of
https://github.com/Doctorado-ML/Stree_datasets.git
synced 2025-08-15 07:26:02 +00:00
Complete excel totals and ignore xlsx in git
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -139,3 +139,4 @@ table.tex
|
||||
report.csv
|
||||
data/csv/*
|
||||
data/oc1output/*
|
||||
*.xlsx
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user