text_plain_output_1.png
from sklearn.feature_extraction.text import TfidfVectorizer

from sklearn.metrics import classification_report, accuracy_score

from sklearn.metrics import plot_confusion_matrix

from sklearn.naive_bayes import MultinomialNB

from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics import classification_report, accuracy_score
from sklearn.naive_bayes import MultinomialNB
from sklearn.metrics import plot_confusion_matrix
tfidf_vec = TfidfVectorizer().fit(X_train)
X_train_vec, X_test_vec = (tfidf_vec.transform(X_train), tfidf_vec.transform(X_test))
model = MultinomialNB()
model.fit(X_train_vec, y_train)
print(classification_report(y_test, model.predict(X_test_vec)))
plot_confusion_matrix(model, X_test_vec, y_test)