Commit fed1cb40 by Pamela Osuna

no changes

parent 6bd66d16
......@@ -5,7 +5,7 @@ from confusion_matrix import plot_confusion_matrix
"""
(c,b,e,o) will be read from the command line or a script
(c,b,e,o) corresponds to the combinations of the specific hyperparameters
(c,b,e,o) corresponds to the combinations of the specific hyperparameters
to build the model
c belongs to {0,1,2,3} and represents the layer architecture
b belongs to {0,1} and represents the batch size
......@@ -33,7 +33,7 @@ for params in combinations:
if avg_auc > max_avg_auc:
max_avg_auc = avg_auc
max_params = params
#%%
print("Best params:",max_params)
# once we have chosen the optimal parameters we can do the normal kfold
......@@ -43,15 +43,15 @@ acc, auc, cm, pr = cnn.run_kfold(input_, output_, max_params)
#%%
labels = [
'[~R & ~E]',
'[~R & E]',
'[ R & ~E]',
'[~R & ~E]',
'[~R & E]',
'[ R & ~E]',
'[ R & E]'
]
#this function saves the matrix image automatically
plot_confusion_matrix(cm, labels)
plot_confusion_matrix(cm, labels)
f = open("out/acc_auc.txt", 'w+')
f.write("Average accuracy: " + str(acc)+"\n")
f.write("Average area under the curve: " + str(auc))
f.close()
\ No newline at end of file
f.close()
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