from sklearn metrics import confusion_matrix confusion confusion_matrix(y_testpred_logregprint("confusion matrix:\ {}format(confusion)out[ ]confusion matrix[[ ]the output of confusion_matrix is two-by-two arraywhere the rows correspond to the true classes and the columns correspond to the predicted classes each entry counts how often sample that belongs to the class corresponding to the row (here"not nineand "nine"was classified as the class corresponding to the column the following plot (figure - illustrates this meaningin[ ]mglearn plots plot_confusion_matrix_illustration(figure - confusion matrix of the "nine vs restclassification task model evaluation and improvement