figure size plot confusion matrix in scikit learn

To change the default of sklearn metrics package we should do:

fig, ax = plt.subplots(figsize=(20, 20))plot_confusion_matrix(clf, X_test, y_test, cmap=plt.cm.Blues, ax=ax)plot.show()

example:

from sklearn.metrics import plot_confusion_matrixfig, ax = plt.subplots(figsize=(15, 15))
plot_confusion_matrix(slf_4, X_test, y_test, normalize='true', cmap=plt.cm.Blues, ax=ax)
plt.show()

Posting daily about Python, Nuclear Physicist PhD