.. _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


**Python source code:** :download:`plot_confusion_matrix.py <plot_confusion_matrix.py>`

.. literalinclude:: plot_confusion_matrix.py
    :lines: 9-