title: How can I print the confusion matrix in the deep learning model?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>def inspection_performance(predicted_fraud, test_fraud):
      
      Inspect_Rate = []
      Precision=[]
      Recall=[]
  
      
      for i in range(1,100,1):
          
          threshold = np.percentile(predicted_fraud, i)
          precision = np.mean(test_fraud[predicted_fraud &gt; threshold])
          recall = sum(test_fraud[predicted_fraud &gt; threshold])/sum(test_fraud)
          Inspect_Rate.append(100-i)
          Precision.append(precision)
          Recall.append(recall)
  
      compiled_conf_matrix = pd.DataFrame({
          
          'İnceleme Oranı':Inspect_Rate,
          'Kesinlik':Precision,
          'Hatırlama':Recall,
  
      })
  
      return compiled_conf_matrix</code></pre>
  </div>
  </div>
  </p>
  <p>I can not print the confusion_matrix results. Then I want to get the certainty, recall, and the f-score, but I can't. This is my code guide. How can I get this by writing code similar to the one below?</p>
  <pre><code>from sklearn.metrics import classification_report, confusion_matrix
  print(confusion_matrix(y_test, y_pred))
  </code></pre>
  <p>As an example, I want to get results like this at the end.</p>
  <pre><code>print(classification_report(y_test, y_pred))
  
                   precision   recall  f1-score   support
  
             0       0.96      0.68      0.80     37117
             1       0.14      0.67      0.23      2883
  
      accuracy                           0.68     40000
     macro avg       0.55      0.68      0.52     40000
  weighted avg       0.90      0.68      0.76     40000
  </code></pre>
  <p>I have to write something else instead of y_test and y_pred. But I don't know how to write.</p>
  <ul>
  <li><p>For reference, the code of the ROC-AUC curve is as follows. Which tag should be instead of (y_true, y_pred) here?</p>
  <pre><code> from matplotlib import pyplot as plt
   from sklearn.metrics import roc_curve
   from sklearn.metrics import auc
  
   fpr, tpr, _ = roc_curve(test_labels.drop(np.where(np.isnan(y_pred))[0]), np.delete(y_pred, np.where(np.isnan(y_pred))[0]))
  
   plt.plot(fpr, tpr, label='ROC curve')
   plt.plot([0, 1], [0, 1], 'k--', label='Random guess')
   plt.xlabel('False positive rate')
   plt.ylabel('True positive rate')
   plt.title('ROC curve')
   plt.legend(loc=&quot;lower right&quot;)
   plt.show()
   print('auc: ', auc(fpr, tpr))
  </code></pre>
  </li>
  <li><p>print(confusion_matrix(?, ?))</p>
  </li>
  <li><p>print(classification_report(?, ?))</p>
  </li>
  </ul>
  <p>What should get where there are essentially question marks?</p>