By the end of this station, you can:
- Compare writing rules by hand with learning from examples
- Describe the difference between training a model and using it
- Explain what labels and features are in supervised learning
Try writing the rules for “cat”
Imagine writing a program that recognizes cats in photos. Pointy ears? Some dogs have those. Whiskers? So do seals. Four legs? So does a table. The list of rules never ends.
Machine learning flips the approach. Instead of writing the rules, you show the computer thousands of photos labeled “cat” or “not cat” and let it find the patterns itself.
Key terms
- Model
- The result of training: a set of learned patterns (stored as numbers) that turns an input into a prediction.
- Training
- The process of adjusting a model using example data so its predictions get better.
- Inference
- Using an already-trained model to make a prediction on new input.
- Label
- The correct answer attached to a training example, such as “spam” or “not spam.”
- Feature
- A measurable piece of information the model uses as input, like a song's tempo or an email's number of links.
- Supervised learning
- Machine learning from examples that come with labels, so the model can compare its guesses to the right answers.
How supervised learning works
Collect examples
Gather data, like thousands of past emails.
Add labels
Mark each example with the correct answer: spam or not spam.
Train
The model guesses, checks its guess against the label, and adjusts to make fewer mistakes.
Test
Check the model on examples it has never seen to see if it learned real patterns.
Use it (inference)
The trained model now sorts brand-new emails as they arrive.
Knowledge check 1
+10 XP on first tryInteractive lab
Train a Classifier
Pick a label, then click the chart (or use the sliders and “Add example”) to add labeled songs. The shaded background shows what the model would predict everywhere.
Energy →
Tempo →
Workout example Chill example Mystery song
Model prediction
The mystery song looks like Chill — 2 of 3 nearest examples agree (unsure).
6 training examples
You
A photo app is trained on millions of labeled pictures of dogs, cats, food and beaches.
AI assistant (sample)
Later, you snap a picture of your lunch and the app tags it as “food” in a split second.
Why it matters: The slow, expensive part (training) happened once, before you downloaded the app. What happens on your phone is inference — applying what the model already learned.
Learn moreOther kinds of machine learning
Unsupervised learning looks for structure in data that has no labels — for example, grouping shoppers with similar habits without being told what the groups are.
Reinforcement learning learns by trial and error, earning rewards for good outcomes. It's often used to train systems to play games or control robots.
Knowledge check 2
+10 XP on first tryKey takeaways
- Machine learning finds patterns in examples instead of relying only on hand-written rules.
- Features are the inputs; labels are the correct answers the model learns to predict.
- Training builds the model; inference uses it on new data.
- Model outputs are predictions that can be wrong.
Sources for this lesson
- Google for Developers. Machine Learning Crash Course. Full citation
- University of Helsinki and MinnaLearn. Elements of AI. Full citation
Finish this station
Answer every knowledge check (right or wrong) to unlock completion.
- Knowledge check 1 — not answered yet
- Knowledge check 2 — not answered yet
0/2 checks answered