Commit d1f61e9a by Pamela Osuna

confusion matrix added

parent e8dab1d3
import cnn
import parser
from parser import parse_data
import itertools
from confusion_matrix import plot_confusion_matrix
"""
(c,b,e) will be read from the command line or a script
......@@ -23,7 +24,7 @@ combinations = itertools.product(c_,b_,e_)
#parse the data
input_, output_ = parser.parse_data(n_experiences)
input_, output_ = parse_data(n_experiences)
#run an specific combination
max_params = combinations[0]
......@@ -42,9 +43,9 @@ for params in combinations:
# once we have chosen the optimal parameters we can do the normal kfold
#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)
acc, auc, cm = cnn.run_kfold(X_train_opt, X_test_kfold_opt, y_train_kfold_opt, y_test_kfold_opt, max_params)
labels = ['~robust&~evolvable', 'evolvable&~robust', 'robust&~evolvable', 'robust&evolvable']
plot_confusion_matrix(cm, labels)
## 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