Add print seed when crossvalidating in Experiment

This commit is contained in:
2021-03-15 01:37:44 +01:00
parent 0329fa2777
commit da8b76679d

View File

@@ -82,6 +82,7 @@ class Experiment:
total[item] = []
for random_state in [57, 31, 1714, 17, 23, 79, 83, 97, 7, 1]:
model.set_params(**{"random_state": random_state})
print(f"{random_state}, ", end="", flush=True)
with warnings.catch_warnings():
warnings.filterwarnings("ignore")
# Also affect subprocesses
@@ -91,6 +92,7 @@ class Experiment:
)
for item in outcomes:
total[item].append(results[item])
print("end")
outcomes = Outcomes(host=self._host, model=self._model_name)
parameters = json.dumps(parameters, sort_keys=True)
outcomes.store(dataset, normalize, standardize, parameters, total)