.. _example_plot_confusion_matrix.py: ================ Confusion matrix ================ Example of confusion matrix usage to evaluate the quality of the output of a classifier. .. image:: images/plot_confusion_matrix_1.png :align: center **Script output**:: [[25 0 0] [ 0 2 28] [ 0 0 20]] **Python source code:** :download:`plot_confusion_matrix.py ` .. literalinclude:: plot_confusion_matrix.py :lines: 9-