Reputation: 35
As can be seen from above picture,this problem makes me very confused.
Upvotes: 2
Views: 6270
Reputation: 5304
labels
is not a positional argument but a keyword argument.
Therefore, you should call the function as follow:
from sklearn.metrics import confusion_matrix
confusion_matrix(y_true, y_pred, labels=classes)
Upvotes: 1