Let's initialize the classifier in a manner identical to our logistic regression classifier, as follows:
from sklearn.naive_bayes import MultinomialNB as MNBmnb_clf = Pipeline([('vect', CountVectorizer()), ('clf',MNB())])
The previous command will measure performance on the following:
mnb_clf.fit(X=X_train, y=y_train)mnb_acc, mnb_predictions = imdb_acc(mnb_clf)mnb_acc # 0.81356