Update and fix reports

This commit is contained in:
2021-09-22 18:04:27 +02:00
parent 4ad61998f4
commit db771bf6f2
3 changed files with 11 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
host=127.0.0.1
port=3306
user=stree
password=xtree
database=stree
sqlite=./data/stree.sqlite

View File

@@ -12,6 +12,8 @@ models = [
"odte",
"cart",
"oc1",
"j48svm",
"wodt",
]

View File

@@ -125,9 +125,10 @@ def process_dataset(dataset, verbose, model, params):
if model == "stree":
# Get the optimized parameters
record = dbh.find_best(dataset, model, "gridsearch")
hyperparameters = json.loads(record[8] if record[8] != "" else "{}")
hyperparameters = json.loads(
record[8].replace('\\"', '"') if record[8] != "" else "{}"
)
hyperparameters.pop("random_state", None)
print("*" * 100)
for random_state in random_seeds:
random.seed(random_state)
np.random.seed(random_state)