# Confusion matrix plot with python

I'm for a function that can plot the following plot using python:

Disclaimer,

You can use PyCM which is a python module in order to save your confusion matrix and its evaluation parameters in a html report.

You can use the following commands:

from pycm import *
y_actu = [2, 0, 2, 2, 0, 1, 1, 2, 2, 0, 1, 2]
y_pred = [2, 0, 2, 2, 0, 2, 1, 2, 2, 0, 2, 2]
cm = ConfusionMatrix(y_actu, y_pred)
cm.save_html(filename,color=(100,50,250))


and the result will be as the following: