mirror of
https://github.com/Doctorado-ML/Stree_datasets.git
synced 2025-08-15 23:46:03 +00:00
Add stree default to analysis
add experiment to report_mysql fix crosval experiment to get the best "gridsearch" parameters
This commit is contained in:
@@ -17,6 +17,14 @@ def parse_arguments() -> Tuple[str, str, str, bool, bool]:
|
||||
required=False,
|
||||
default="any",
|
||||
)
|
||||
ap.add_argument(
|
||||
"-e",
|
||||
"--experiment",
|
||||
type=str,
|
||||
choices=["gridsearch", "crossval"],
|
||||
required=False,
|
||||
default="crossval",
|
||||
)
|
||||
ap.add_argument(
|
||||
"-x",
|
||||
"--excludeparams",
|
||||
@@ -29,6 +37,7 @@ def parse_arguments() -> Tuple[str, str, str, bool, bool]:
|
||||
return (
|
||||
args.model,
|
||||
args.excludeparams,
|
||||
args.experiment,
|
||||
)
|
||||
|
||||
|
||||
@@ -54,7 +63,7 @@ def report_header(exclude_params):
|
||||
|
||||
def report_line(record, agg):
|
||||
accuracy = record[5]
|
||||
expected = record[13]
|
||||
expected = record[16]
|
||||
if accuracy < expected:
|
||||
agg["worse"] += 1
|
||||
sign = "-"
|
||||
@@ -94,6 +103,7 @@ def report_footer(agg):
|
||||
(
|
||||
classifier,
|
||||
exclude_parameters,
|
||||
experiment,
|
||||
) = parse_arguments()
|
||||
dbh = MySQL()
|
||||
database = dbh.get_connection()
|
||||
@@ -124,7 +134,7 @@ for item in [
|
||||
] + models:
|
||||
agg[item] = 0
|
||||
for dataset in dt:
|
||||
record = dbh.find_best(dataset[0], classifier)
|
||||
record = dbh.find_best(dataset[0], classifier, experiment=experiment)
|
||||
if record is None:
|
||||
print(TextColor.FAIL + f"*No results found for {dataset[0]}")
|
||||
else:
|
||||
|
Reference in New Issue
Block a user