title: Plot confusion matrix sklearn with multiple labels
body: <p>I am plotting a confusion matrix for a multiple labelled data, where labels look like: </p>
  
  <blockquote>
    <p>label1: 1, 0, 0, 0</p>
    
    <p>label2: 0, 1, 0, 0</p>
    
    <p>label3: 0, 0, 1, 0</p>
    
    <p>label4: 0, 0, 0, 1</p>
  </blockquote>
  
  <p>I am able to classify successfully using the below code. <strong>I only need some help to plot confusion matrix.</strong></p>
  
  <pre><code>    for i in range(4):
          y_train= y[:,i]
          print('Train subject %d, class %s' % (subject, cols[i]))
          lr.fit(X_train[::sample,:],y_train[::sample])
          pred[:,i] = lr.predict_proba(X_test)[:,1]
  </code></pre>
  
  <p>I used the following code to print confusion matrix, but it always return a 2X2 matrix  </p>
  
  <pre><code>prediction = lr.predict(X_train)
  
  print(confusion_matrix(y_train, prediction))
  </code></pre>