Answers for "what is the output of the following python code def confusion(num)"

0

confusion matrix python code

from sklearn.metrics import confusion_matrix
cm = confusion_matrix(y_test, y_predicted)
cm
# after creating the confusion matrix, for better understaning plot the cm.
import seaborn as sn
plt.figure(figsize = (10,7))
sn.heatmap(cm, annot=True)
plt.xlabel('Predicted')
plt.ylabel('Truth')
Posted by: Guest on April-08-2021

Code answers related to "what is the output of the following python code def confusion(num)"

Python Answers by Framework

Browse Popular Code Answers by Language