← Back to course
1/6
Week 03 Β· How Models Learn

Monday

Learning from examples
// The crew trains Tiny Text by hand to see how training data becomes predictions
⏱ about 20 min

Monday: Learning from Examples

Comet drops into her chair with packet section P3 in hand. "Public text and study material," she reads. "So SH-1 just read a lot and now it knows everything?"

Wren frowns at the page. "What does the evidence say? 'Knows' is a big word. What did it actually do with all that reading?"

Comet taps her pencil against her notebook. "I honestly don't know how a computer learns anything."

Nova projects a short table of practice questions, each labelled easy or hard by Teacher Dev. "Would you like a hint?" she asks. "Look for what the hard ones have in common."

Comet slides the table toward you. "Reviewer, can you find the pattern before I can?"

Real AI check
Nova is a character in our story. Real AI is a tool people build. It does not think or feel like a person, and it can be wrong.

Computers can learn from data

Computers can learn from data. Machine learning is a kind of statistical inference that finds patterns in data.

Machine learning needs huge amounts of data. This training data must usually be supplied by people.

Many areas of AI have improved quickly because of learning algorithms that create new representations of data.

Finding a pattern is not the same as knowing something the way a person does. AI does not think the way a person does.

Find the pattern

Teacher Dev labelled eight Algebra practice questions as easy or hard. This is a made-up example for the story.

Question (made up)Steps to solveTeacher Dev's label
Q1 Add 7 and 5One stepEasy
Q2 Find x when x plus 3 is 10One stepEasy
Q3 Find x when 2x plus 3 is 11Two stepsHard
Q4 Double 9One stepEasy
Q5 Find the slope, then use it to find a pointTwo stepsHard
Q6 Subtract 4 from 12One stepEasy
Q7 Find x when 3x minus 2 is 13, then check itThree stepsHard
Q8 Find x when 5x plus 1 is 21Two stepsHard
LEARN FROM THE EXAMPLES
  • Read the question.
  • Tap your answer.
What pattern do the hard questions share?
A new question says: find x when 4x minus 3 is 9. It takes two steps. What label does the pattern predict?
Who supplied the labels the pattern was learned from?
You learned a pattern from only eight examples. What does real machine learning need?
LEARNING FROM EXAMPLES, STEP BY STEP
  • ?People supply examples with labels.
  • ?A pattern is found in the examples.
  • ?The pattern is used to predict a label for a new example.
  • ?Someone checks whether the prediction was right.
WHY THIS EXERCISEThis is the basic shape of learning from data, and checking is part of it.
StatementTrue or false?
Machine learning is a kind of statistical inference that finds patterns in data.?
Training data is usually supplied by people.?
Machine learning works best with only a handful of examples.?
Finding a pattern means a computer knows things the way a person does.?
WHY THIS EXERCISEKnowing what "learning" means for a machine keeps a reviewer from over-trusting it.

Strong start, reviewer. Tomorrow the crew builds a tiny model that learns which word comes next.