from sklearn import metrics metrics.ConfusionMatrixDisplay.from_predictions(true_y, predicted_y).plot()