Medium⏱ time2 hr$ cost0
Spam Email Classifier
Train a model on example messages so it can flag new ones as spam or not.
Start building ↓
Result first
The build
Step 01
Prepare text
Clean and split messages into words.
Step 02
Vectorise
Turn words into number features (bag-of-words).
Step 03
Train classifier
Fit a model on labelled spam/ham.
Step 04
Test
Check accuracy on unseen messages.
Working Principle
The model learns which words appear more in spam, then scores a new message by the words it contains to decide spam or not.
The science behind it
A closer look
A Naive Bayes classifier multiplies word probabilities; common spam words tip the balance toward the spam label.
Take it further
Variables to test
- 1 Add more training examples — accuracy up?
- 2 Find words that fool it — why?
More AI
AI
Hand-Drawn Digit Classifier
Train a tiny neural network in the browser to recognise digits you draw with a mouse.
Medium⏱2 hr$0
AI
Rock-Paper-Scissors Vision
Use a webcam and a no-code model to recognise your hand and play rock-paper-scissors.
Easy⏱1 hr$0
AI
Sentiment Analyzer
Feed in movie reviews and the model tells you whether each one is positive or negative.
Medium⏱2 hr$0