Text Classification by Hand: Naive Bayes Spam Filter & Sentiment
Build a Naive Bayes text classifier cell by cell: priors, word counts with SUMIFS, Laplace smoothing, log-probability scores with SUMPRODUCT, a confusion matrix, precision/recall/F1 at a log-odds threshold, a lexicon-vs-Naive-Bayes sentiment test and the most informative words, in 8 graded labs.
The first lesson is free — no account needed.
About this course
A Naive Bayes text classification course that builds a spam filter for one fictional design studio's inbox formula by formula, for data science students, analysts and anyone who wants to see how a classifier reads text. You turn class counts into priors and the prior log-odds, count each vocabulary word per class with SUMIFS and spot the zero-count problem, fix it with Laplace (add-one) smoothing, score a new message with log-probabilities and one SUMPRODUCT per class and turn the log-odds back into a spam probability, classify a batch of test messages into a confusion matrix, compare precision, recall and F1 at two log-odds thresholds, test a word lexicon against Naive Bayes on product reviews and rank the most informative words by their log-likelihood ratio. No coding required. The first lab is free.
Lessons
- Priors from Class Counts: How Common Is Spam?Free
- Word Counts per Class with SUMIFS Pro
- Laplace Smoothing & Word Likelihoods Pro
- Log-Probabilities & Scoring a Message with SUMPRODUCT Pro
- Classify a Batch & Build the Confusion Matrix Pro
- Precision, Recall & F1: Moving the Threshold on the Log-Odds Pro
- Sentiment: a Word Lexicon vs Naive Bayes Pro
- Most Informative Words: Log-Likelihood Ratios & a Ranking Chart Pro