Commit 5945ed43 by Pamela Osuna

final kfold added

parent db5a9e46
......@@ -30,10 +30,21 @@ max_params = combinations[0]
max_avg_auc = 0
for params in combinations:
avg_acc, avg_auc = cnn.run_nn(input_, output_, n_experiences, params)
avg_acc, avg_auc, X_train_kfold, X_test_kfold, y_train_kfold, y_test_kfold = cnn.run_nn(input_, output_, n_experiences, params)
if avg_auc > max_avg_auc:
max_avg_auc = avg_auc
max_params = params
X_train_kfold_opt = X_train_kfold
X_test_kfold_opt = X_test_kfold
y_train_kfold_opt = y_train_kfold
y_test_kfold_opt = y_test_kfold
# once we have chosen the optimal parameters we can do the normal kfold
## to do: final kfold with optimal parameters, code to execute in paralel, make sure it's the same random shuffle ...
#note: the test data remains unbalanced
acc, auc = cnn.run_kfold(X_train_opt, X_test_kfold_opt, y_train_kfold_opt, y_test_kfold_opt, max_params)
## TO DO: create confusion matrix, etc...
## TO DO: code that allows to execute in parallel, make sure it's the same random shuffle ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment