← Back to course
AI Explorers 6-8 / Week 06 / Thursday
4/6
Week 06 · Train, Test, Refine

Thursday

Refine and retest
// Measuring how well Sky Sorter really works
⏱ about 20 min

Thursday: Refine and Retest

Rocket wants to change the comet cut-off right away. "T7 was size 7, so I will set it to 7. Done!"

Raven stops him. "If we tune Sky Sorter on the test cards, they are not a fair test any more."

"Then how do we improve it?" Rocket asks.

Nova shows two paths on the wall. "Add more labeled comets to the training set," she says. "Let the training data show the cut-off."

"Then test on a fresh envelope of cards nobody has used yet."

Raven nods and reaches for a new envelope.

A fair refine loop

To refine a sorter, change it using the training set, not the test set.

The crew labels twenty more comets. Several are only 7 pixels wide, and no planet in the training set is that big.

Counting again, a comet cut-off of size 7 now fits the training data best.

Then they test version 3 on ten fresh cards nobody has used before.

Train
↓
Test on held-back cards
↓
Study the mistakes
↓
Add or fix training data
↓
Train again
↓
Test on fresh cards
SKY SORTER, VERSION 3
IF streak is yes THEN label = "satellite streak"
ELSE IF size >= 7 THEN label = "comet"
ELSE IF size >= 4 THEN label = "planet"
ELSE label = "star"
CardBrightnessSizeStreak?True labelVersion 3 label
N11402nostarstar
N22256noplanetplanet
N31107nocometcomet
N41901yessatellite streaksatellite streak
N58011nocometcomet
N62154noplanetplanet
N7702nostarstar
N81605noplanetplanet
N9953noplanetstar
N102001yessatellite streaksatellite streak
Version 3: right out of 10
Version 3 accuracy as a percent
Version 2 scored 75 percent. How many percentage points better is version 3?
REFINE FAIRLY
  • Read the question.
  • Tap your answer.
Why did the crew add more comets to the training set instead of tuning on T7?
Why test version 3 on fresh cards, not the old eight?
N9 is a small planet labeled star. What might fix it?
StatementTrue or false?
Refining a sorter should use the training set.?
Version 3 lowered the comet cut-off from 8 to 7.?
After refining, the crew retested on fresh cards.?
Version 3 is now correct on every possible card.?
WHY THIS EXERCISERefining and retesting is a loop that improves a sorter step by step, but never makes it perfect.
PUT THE REFINE LOOP IN ORDER
  • Tap a card.
  • Then tap its spot.
1First
2Second
3Third
4Last
Which card did version 3 still get wrong? Type its number without the N.
WHY THIS EXERCISEKnowing exactly which card fails points to the next refinement.

Excellent refining! Tomorrow we see what happens when the data itself changes.

← Wednesday