Skip to content
Snippets Groups Projects
Commit d0065a92 authored by Schneider Leo's avatar Schneider Leo
Browse files

extracting peptide set from txt

parent 48db0218
No related branches found
No related tags found
No related merge requests found
...@@ -215,7 +215,7 @@ def run_duo(args): ...@@ -215,7 +215,7 @@ def run_duo(args):
def make_prediction_duo(model, data, f_name): def make_prediction_duo(model, data, f_name):
y_pred = [] y_pred = []
y_true = [] y_true = []
print('Building confusion matrix')
# iterate over test data # iterate over test data
for imaer,imana, label in data: for imaer,imana, label in data:
label = label.long() label = label.long()
...@@ -238,6 +238,8 @@ def make_prediction_duo(model, data, f_name): ...@@ -238,6 +238,8 @@ def make_prediction_duo(model, data, f_name):
cf_matrix = confusion_matrix(y_true, y_pred) cf_matrix = confusion_matrix(y_true, y_pred)
df_cm = pd.DataFrame(cf_matrix[:, None], index=[i for i in classes], df_cm = pd.DataFrame(cf_matrix[:, None], index=[i for i in classes],
columns=[i for i in classes]) columns=[i for i in classes])
print('Saving Confusion Matrix')
plt.figure(figsize=(14, 9)) plt.figure(figsize=(14, 9))
sn.heatmap(df_cm, annot=True) sn.heatmap(df_cm, annot=True)
plt.savefig(f_name) plt.savefig(f_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment