Skip to content

Instantly share code, notes, and snippets.

Created February 7, 2021 14:11
What would you like to do?
from sklearn.naive_bayes import GaussianNB
from sklearn.naive_bayes import MultinomialNB
from sklearn import datasets
from sklearn.metrics import confusion_matrix
iris = datasets.load_iris()
gnb = GaussianNB()
mnb = MultinomialNB()
y_pred_gnb =,
cnf_matrix_gnb = confusion_matrix(, y_pred_gnb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment