mirror of
https://github.com/Doctorado-ML/Stree_datasets.git
synced 2025-08-16 07:56:07 +00:00
Add new stat in analysis_mysql
generate new report.csv
This commit is contained in:
@@ -103,10 +103,11 @@ def report_footer(agg):
|
||||
color + f"{item:10s} used {agg[item]['items']:2d} times ", end=""
|
||||
)
|
||||
print(
|
||||
color + f"better {agg[item]['better']:2d} times ",
|
||||
color + f"better than reference {agg[item]['better']:2d} times ",
|
||||
end="",
|
||||
)
|
||||
print(color + f"worse {agg[item]['worse']:2d} times ")
|
||||
print(color + f"worse {agg[item]['worse']:2d} times ", end="")
|
||||
print(color + f"best of models {agg[item]['best']:2d} times")
|
||||
color = (
|
||||
TextColor.LINE2 if color == TextColor.LINE1 else TextColor.LINE1
|
||||
)
|
||||
@@ -131,6 +132,7 @@ for item in [
|
||||
agg[item]["items"] = 0
|
||||
agg[item]["better"] = 0
|
||||
agg[item]["worse"] = 0
|
||||
agg[item]["best"] = 0
|
||||
if csv_output:
|
||||
f = open(report_csv, "w")
|
||||
print("dataset, classifier, accuracy", file=f)
|
||||
@@ -159,11 +161,13 @@ for dataset in dt:
|
||||
agg[model]["worse"] += 1
|
||||
item = f"{accuracy:9.7} {sign}"
|
||||
line["reference"] = f"{reference:9.7}"
|
||||
line[model] = (
|
||||
TextColor.GREEN + TextColor.BOLD + item + TextColor.ENDC
|
||||
if accuracy == max_accuracy
|
||||
else color + item
|
||||
)
|
||||
if accuracy == max_accuracy:
|
||||
line[model] = (
|
||||
TextColor.GREEN + TextColor.BOLD + item + TextColor.ENDC
|
||||
)
|
||||
agg[model]["best"] += 1
|
||||
else:
|
||||
line[model] = color + item
|
||||
if csv_output:
|
||||
print(f"{dataset[0]}, {model}, {accuracy}", file=f)
|
||||
if not find_one:
|
||||
|
Reference in New Issue
Block a user