Machine Learning Basics
Data, Features and Labels
In this lesson you will
- Describe a dataset as rows and columns
- Tell features and labels apart
- Explain why data quality matters
Introduction
A model is only as good as the examples it learns from. Before any learning happens, people have to prepare data. This lesson explains the words you will hear again and again.
The simple explanation
Data is a table. Each row is one example. Features are the clues, and the label is the answer you want to predict.
Imagine predicting the price of a used bike:
| age_years | brand_new_price | condition | price_sold |
|---|---|---|---|
| 2 | 400 | good | 280 |
| 5 | 450 | fair | 150 |
| 1 | 380 | excellent | 320 |
- Each row is one bike.
- The features are the clues:
age_years,brand_new_priceandcondition. - The label (also called the target) is what we want to predict:
price_sold.
Quick quiz
In the bike table, which column is the label?
Quality beats quantity
Models learn whatever is in the data, including its flaws:
- Missing or wrong values confuse the model, so data is cleaned first.
- Too few examples means the model may learn from luck.
- Unrepresentative data gives unfair results. A model trained only on photos taken in daylight may fail at night.
- Bias in the data becomes bias in the model.
A common saying is "garbage in, garbage out".
Getting data ready
Teams often spend more time on data than on the model. Typical steps are removing duplicates, filling or dropping missing values, turning words such as "good" into numbers, and putting numbers on a similar scale.
Try it yourself
Pick something you would like to predict, such as how long a bus journey will take. List three features that might help and say what the label is.
Summary
- A dataset is rows (examples) and columns.
- Features are the inputs, and the label is the answer to predict.
- Clean, varied, fair data matters more than anything else.
Lesson complete
+20 XP
Nice work. Keep going while it is fresh.
Sources and further reading