Bag of words & TF-IDF
Step 2 of 10 in NLP · Build · Easy
Represent a document by word counts, weighting words by how rare they are across documents. Simple, fast and still a strong baseline.
Build it
Newsgroup classifier
TF-IDF by hand, then logistic regression on 4 categories of 20 Newsgroups.
Done when: Matches sklearn TfidfVectorizer; over 85% accuracy.
Resources
Earn this star
On the map, you log what you built. Finish the step and its star lights.
Open this step on the map