old_contents: import matplotlib.pyplot as plt
  import numpy as np
  
  m = np.array([[1, 0, 0, 0], [0, 1, 1, 1], [0, 1, 0, 1], [1, 0, 0, 1]])
  
  
  plt.matshow(m)
  plt.colorbar()
  plt.show()
  
new_contents: import numpy as np
  from sklearn.metrics import confusion_matrix
  import matplotlib.pyplot as plt
  import itertools
  classes = np.array([1,2])
  cm = np.array(([1,2],[0,1]))
  plt.figure()
  plt.imshow(cm, interpolation='nearest', cmap=plt.cm.Blues)
  plt.colorbar()
  tick_marks = np.arange(len(classes))
  plt.xticks(tick_marks, classes, rotation=45)
  plt.yticks(tick_marks, classes)
  plt.ylabel('True label')
  plt.xlabel('Predicted label')
  fmt = '.2f' if False else 'd'
  thresh = cm.max() / 2.
  for i, j in itertools.product(range(cm.shape[0]), range(cm.shape[1])):
          plt.text(j, i, format(cm[i, j], fmt),
                   horizontalalignment="center",
                   color="white" if cm[i, j] > thresh else "black")
  plt.show()
subject: update confusion matrix