← Back to course
1/6
Week 06 Β· Train, Test, Refine

Monday

Where training data comes from
// Measuring how well Sky Sorter really works
⏱ about 20 min

Monday: Where Training Data Comes From

Mission control has a new delivery: two hundred fresh snapshot cards, and not one of them labeled.

"Sky Sorter needs labeled examples to learn from," Raven says. "Somebody has to label these."

Rocket groans, then grabs a pencil. Within an hour, he has labeled forty cards.

Raven checks his stack and holds one up. "This is a comet with a faint tail. You wrote star."

Nova hovers over the pile. "Every label is a lesson," she says. "A wrong label teaches a wrong lesson."

Rocket sighs and starts double-checking his whole stack.

People supply the data

Machine learning needs tremendous amounts of training data.

That training data usually has to be supplied by people. Sometimes the machine gathers it itself.

For Sky Sorter, people take the snapshots, measure the features and write the labels.

The patterns a sorter learns can only be as good as the examples it learns from.

CardBrightnessSizeStreak?Label Rocket wroteCorrect label
R11402nostarstar
R22206noplanetplanet
R31109nostarcomet
R41901yessatellite streaksatellite streak
R52005noplanetplanet

These cards are invented for our story.

CHECK THE LABELS
  • Read the question.
  • Tap your answer.
Which card did Rocket mislabel?
If R3 stays mislabeled, what might Sky Sorter learn?
Who usually supplies training data?

Checking the data

Before training, careful teams check their data.

They look for missing numbers, impossible numbers and labels that do not fit.

A brightness of 300 is impossible on our 0 to 255 scale, so that card needs a second look.

Card problemNeeds fixing?
Brightness 300?
Size 4, labeled planet?
Size left blank?
Streak yes, labeled star?
WHY THIS EXERCISECleaning the data before training stops errors from becoming patterns.
How many of the five cards did Rocket label correctly?
What is the highest possible brightness value?
GET A CARD READY FOR TRAINING
  • ?Add the card to the training set.
  • ?Measure brightness, size and streak.
  • ?Have a second person check the label.
  • ?Write the correct label.
  • ?Take the snapshot.
WHY THIS EXERCISEEvery step in preparing data is a chance to catch a mistake.
Try it
Copy the five cards onto index cards with the labels hidden.
Ask someone at home to label them using the week 4 decision tree. Compare their labels with the correct ones.

Great work! Tomorrow we learn why some labeled cards must be kept secret from the sorter.