In [1]:
from sklearn.metrics import confusion_matrix
y_true = [0,0,0,0,0,1,1,1,1,1]
y_pred = [0,0,0,1,1,0,1,1,1,1]
confusion_matrix(y_true, y_pred)
Out[1]:
array([[3, 2],
       [1, 4]])
In [ ]: