Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sklearn plot confusion matrix

from sklearn.linear_model import LogisticRegression
from sklearn.metrics import  plot_confusion_matrix
clf = LogisticRegression()
clf.fit(X_train,y_train)
disp = plot_confusion_matrix(clf,X_test,y_test,cmap="Blues",values_format='.3g')
plt.tight_layout()
plt.ylabel('True label')
plt.xlabel('Predicted label')
Source by localhost #
 
PREVIOUS NEXT
Tagged: #sklearn #plot #confusion #matrix
ADD COMMENT
Topic
Name
9+9 =