Add stree default to analysis

add experiment to report_mysql
fix crosval experiment to get the best "gridsearch" parameters
This commit is contained in:
2021-03-26 00:06:48 +01:00
parent 66bceff179
commit 7f75115fa9
4 changed files with 46 additions and 22 deletions

View File

@@ -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: