Created
August 3, 2020 16:26
-
-
Save lisanka93/60ec55351144e2cb6fd6a312655af15d to your computer and use it in GitHub Desktop.
instantiating countvectorizer and learning vocabulary and transforming arguments into vectors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count_vectorizer = CountVectorizer(binary=True) | |
#fit training data | |
training_data = count_vectorizer.fit_transform(X_train) | |
#transform test data | |
testing_data = count_vectorizer.transform(X_test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment