Add local config a finish report_score

This commit is contained in:
2021-06-30 12:46:58 +02:00
parent e36fed491b
commit b65ccdda1d
6 changed files with 332 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
import argparse
import random
import time
import warnings
from datetime import datetime
import json
import numpy as np
@@ -132,8 +133,9 @@ def process_dataset(dataset, verbose, model, params):
np.random.seed(random_state)
kfold = KFold(shuffle=True, random_state=random_state, n_splits=5)
clf = get_classifier(model, random_state, hyperparameters)
print(hyperparameters)
res = cross_validate(clf, X, y, cv=kfold, return_estimator=True)
with warnings.catch_warnings():
warnings.filterwarnings("ignore")
res = cross_validate(clf, X, y, cv=kfold, return_estimator=True)
scores.append(res["test_score"])
times.append(res["fit_time"])
for result_item in res["estimator"]: