text_plain_output_1.png
from sklearn.metrics import auc

from sklearn.metrics import roc_curve

from sklearn.naive_bayes import GaussianNB

from sklearn.naive_bayes import GaussianNB
gnb = GaussianNB()
gnb.fit(x_train, y_train)
gnb_predict = gnb.predict(x_test)
gnb_predict_prob = gnb.predict_proba(x_test)

fpr, tpr, thresholds = roc_curve(y_test, gnb_predict_prob[:, 1])
gnb_auc = auc(fpr, tpr)
print(gnb_auc)