2 次代碼提交 99ebbe9235 ... ac2e33b7ac

作者 SHA1 備註 提交日期
  Ruben ac2e33b7ac Merge remote-tracking branch 'origin/ruben_model_CNN_tests' into ruben_model_CNN_tests 4 月之前
  Ruben 38ca4cb5bb working model used at poster 4 月之前
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      utils/CNN.py

+ 5 - 1
utils/CNN.py

@@ -9,7 +9,7 @@ import pandas as pd
 import matplotlib.pyplot as plt
 import time
 import numpy as np
-from sklearn.metrics import roc_curve, auc, confusion_matrix
+from sklearn.metrics import roc_curve, auc, confusion_matrix, classification_report
 import seaborn as sns
 
 class CNN_Net(nn.Module):
@@ -182,6 +182,10 @@ class CNN_Net(nn.Module):
             plt.savefig('./confusion_matrix.png')
             plt.show()
 
+            # Classification Report
+            report = classification_report(true_labels, predictionsLabels)
+            print(report)
+
         self.train()
 
         return(loss.item())