Which clues would help a model guess if a Pokémon is Legendary?
Lesson 14.2 · Features and Labels
Felix · Owen
Ten columns. Some are clues. One is just the row number.
Felix pulls up a table of 190 Pokémon with their stats and a column that says whether each one is Legendary.
If a model were going to guess “Legendary” for a Pokémon it had never seen, which columns would actually help?
Some clearly would. Some are just the row number.
The short answer
The four stats, and their total most of all. Legendaries in this table average well over 90 in every stat, and most regular Pokémon don’t. The national number is just where it sits in the list. Felix drops it, and the model gets better.
Try it yourself
Tap the columns that would help a model guess whether a Pokémon is Legendary.
Tap everything that fits, then check.
What you just did has a name
Features and labels
Features are the clues you give the model: the columns it gets to look at.
The label is the answer you want it to predict. Training means showing it rows where both are known.
Using it means giving it the features and asking for the label.
A few more things
The label is what you’re missing
For a new Pokémon, you know its stats and not whether it’s Legendary. For a new video, you know its length and thumbnail and not its views. The label is always the column you wish you had.
Picking features is the craft
Nobody can hand a model every column and hope. Knowing that stats matter and IDs don’t takes knowing something about Pokémon. Module 15 called it “more than one clue,” and it’s most of the job.
Features have to exist at guess time
A model that uses “number of fan videos about it” to guess Legendary would work great on old Pokémon and be useless for a brand-new one. Features have to be things you know before you know the answer.
Go deeper
The longer version, if you want it.
Feature engineering
Raw columns are rarely the best features. Total stats (HP plus attack plus defense plus speed) predicts Legendary better than any single stat. Views in the first 48 hours predicts a hit better than lifetime views. Building new columns out of old ones is called feature engineering, and on many problems it matters more than the choice of model.
Modern deep learning (Module 20) does some of this itself, finding useful combinations of raw pixels or words. For tables like this one, humans still do most of it, with a spreadsheet.
Quick check
A pizza place wants a model that guesses how many pizzas it will sell tomorrow. Which one is the label?
Let’s take it slower
Here’s a quick test. Cover one column with your hand. Is that the column you wish you knew about a new row? Then it’s the label. Everything you left uncovered, and could actually know ahead of time, is a feature. Training is showing the model rows with the hand off, so it can see how the features line up with the label. Using the model is putting the hand back and asking it to guess what’s underneath. If a column only fills in after the answer does, it isn’t a feature. It’s a spoiler.
More examples
The bus delay guess
A transit app says your bus will be 6 minutes late. Its features are the time of day, the rain and how late the previous bus was. Its label is the actual minutes late, which it only learns once the bus shows up.
Which sneaker sells out
A shoe site predicts whether a new release will sell out within an hour. Features: brand, price, how many people set a reminder. Label: sold out or not. Resale price is off the list, because it only exists after the answer does.
Back to the question
So which columns help?
Show the answer
The four stats, and their total most of all. Legendaries in this table average well over 90 in every stat, and most regular Pokémon don’t. The national number is just where it sits in the list. Felix drops it, and the model gets better.
More on this: What is machine learning?
One last question
Felix picks features for a model that predicts video views. Trust his picks?
“Video length and whether the thumbnail has a face are features. Views is the label.”
“The video’s ID number is a good feature.”
“Number of comments is a great feature for predicting views.”
Talk Card
Talk Card · 14.2
Features are the clues a model gets to look at. The label is the answer you want it to predict. Picking good features takes knowing the subject, not just the math.
Data to AI · pettigrewlab.com/learn

