← Back to course
1/6
Week 04 Β· Representation and Reasoning

Monday

A table is a model of the sky
// From feature tables to decision trees
⏱ about 20 min

Monday: A Table Is a Model of the Sky

Mission control is buzzing. Rocket has stacked forty snapshot cards beside the telescope screen, each one turned into a row of numbers.

"We have the feature table," Rocket says. "Now Sky Sorter just has to know what every row means."

Raven frowns at the stack. "A row of numbers is not the sky. It only keeps the parts we chose to measure."

Nova floats over the table and projects one row onto the wall: brightness 230, size 5, streak no.

"Every row is a record," she says. "What can you work out from this one, and what is missing?"

Rocket and Raven lean in to look.

Representations hold what we know

Last week the crew turned each snapshot into a feature table.

That table is a representation: a way of storing what we know so a computer can use it.

Computers build representations out of data structures, such as lists, tables and trees.

Each row of the Sky Sorter table is a record. Each column is one feature.

CardBrightness (0 to 255)Size (pixels wide)Streak?
A1202no
B2305no
C9012no
D1801yes
E2103no
F1509no

These are invented practice cards for our story. We will use them all week.

READ THE TABLE
  • Read the question.
  • Tap your answer.
Which card has the largest size?
Which card shows a streak?
Card B has brightness 230. What does a value near 255 tell you?

What a representation leaves out

A representation is useful because it is simple.

But it also leaves things out. The table does not store color, shape or the time of the snapshot.

If an important clue is missing from the table, no algorithm can use it.

Choosing what goes into a representation is a design decision people make.

StatementTrue or false?
Each row in the Sky Sorter table describes one snapshot.?
A table, a list and a tree are all data structures.?
The table stores everything about the real sky.?
People choose which features go into the table.?
WHY THIS EXERCISEA representation keeps only what its designers chose to measure.
One row of a table is called a ____.
How many features does each card have?
Name one thing about a real snapshot that our table does not store. Type one word.
WHY THIS EXERCISEEvery representation leaves something out, so designers must choose carefully.
TURN A SNAPSHOT INTO A RECORD
  • ?Point the telescope and take a snapshot.
  • ?Check whether the object leaves a streak.
  • ?Write the three numbers as one new row in the table.
  • ?Find the brightest pixel and read its value from 0 to 255.
  • ?Count how many pixels wide the object is.
WHY THIS EXERCISEA record is built from measurements, so the measuring comes first.

Strong start! Tomorrow we use reasoning to get new answers from these records.