text_plain_output_1.png
from sklearn.feature_extraction.text import CountVectorizer

from sklearn.linear_model import LogisticRegression

X_train.shape

from sklearn.feature_extraction.text import CountVectorizer
vect = CountVectorizer().fit(X_train)

len(vect.get_feature_names())

vect.get_feature_names()[0:10]

vect.get_feature_names()[::3000]

X_train_vectorized = vect.transform(X_train)
X_train_vectorized

X_train_vectorized.shape

from sklearn.linear_model import LogisticRegression
model = LogisticRegression()
model.fit(X_train_vectorized, y_train)