title: Confused regarding order output of confusion matrix
body: <p>I used SVM classifier for binary classification. We trained the models using data samples for legitimate users (labeled with &quot;0&quot;, positive class) and undesired users (labeled with&quot;1&quot;, negative class).</p>
  <p>when testing the model I also labeled the samples of legitimate users with zeros and undesired users with ones.
  X_test has 5 data samples (first 5 rows) of legitimates labeled with zeros and other 5 samples (last 5 rows) of undesired users lebeld with ones. This is the labels y_test= [0,0,0,0,0,1,1,1,1,1]</p>
  <p>Then, I classified using this:</p>
  <pre><code>y_pred = classifier.predict(X_test)
  </code></pre>
  <p>the output y_pred = [0,0,0,1,0,1,1,0,0,1]</p>
  <p>In our work, we considered:</p>
  <blockquote>
  <blockquote>
  <p>(True positive)  TP is the legitimate user's samples (with label zero in y_test) that correctly classified as legitimates (with label zero in y_pred).</p>
  </blockquote>
  </blockquote>
  <blockquote>
  <blockquote>
  <p>(False Negative)  FN is the legitimate user's samples (with label zero in y_test) that incorrectly classified as undesired users (with label one in y_pred).</p>
  </blockquote>
  </blockquote>
  <blockquote>
  <blockquote>
  <p>(True negative)  TN is the undesired user's samples (with label one in y_test) that correctly classified as undesired (with label one in y_pred).</p>
  </blockquote>
  </blockquote>
  <blockquote>
  <blockquote>
  <p>(False positive)  FP is the undesired user's samples (with label one in y_test) that incorrectly classified as legitimates(with label zero in y_pred).</p>
  </blockquote>
  </blockquote>
  <p>But, when is input y_test and y_pred to confusion matrix using:</p>
  <pre><code>print('Outcome confusion_matrix values : \n', confusion_matrix(y_test, y_pred))
  </code></pre>
  <p>the confusion gives : [4 1][2 3]</p>
  <p>In the confusion matrix documentation, they say the order is [TN FP][FN TP]</p>
  <p>However, this is the opposite of the order used in our work according to our definitions of TP, FN, FP, TN that we used.
  In our work:</p>
  <pre><code>0--&gt; 0 = TP; 
  0--&gt; 1 = FN;
  1--&gt; 0 = FP;
  1--&gt; 1 = TN;
  </code></pre>
  <p>Thus, I swiped and considered TP =4, FN = 1, FP = 2, TN=3, to match the definitions of our work.</p>
  <p>Am I write? I am so confused, please help me to clarify this.</p>