Data as Examples
Curious to finally see the famous raw material, Iris asks the data team to show her the training data behind the delivery predictions — the examples the model learned from. A data scientist shares her screen, and there it is: a table. Rows and columns, like a spreadsheet from any office on earth. Iris half suspects the real data is hiding behind it.
It isn't. Almost all classical machine learning starts with exactly this: a table where every row is one example from the past, every column is one recorded fact, and one special column holds what actually happened. This page teaches you to read that table the way the data team does — because every prediction problem in this book, from delivery times to fake reviews to fraud, starts life as one.
Rows Are Examples
Each row of Plateful's table is one delivery that really happened. Row one: an order from a Thai place, 3.2 kilometers away, placed at 7 pm on a rainy Friday, delivered in 41 minutes. Row two: a pizza, 1.1 kilometers, Tuesday lunchtime, 24 minutes. Nothing invented, nothing summarized — one row, one recorded case from the past.
The table holds about two million of them, and the volume is the point. A person shown three deliveries learns nothing general; a model shown two million can pick out the patterns that repeat — rain adds minutes, Friday evenings run slow, distance dominates everything. Learning from examples needs examples in bulk, which is why data teams talk about row counts the way builders talk about bricks.
Columns Are Features
The columns running across the top — distance, hour, day of week, weather, restaurant — are the facts recorded about each delivery. Machine learning calls them features: the inputs the model gets to look at when making its prediction. The word is narrower than its everyday cousin — a feature here is not something the app can do, it is one column of facts about one case. When the finished model estimates your dinner's arrival, these columns are the only things it knows about your order.
A teacher's gradebook has the same shape. One row per student; columns for attendance, homework scores, quiz results; and a final-grade column at the end. A new teacher who studied last year's gradebook would develop a feel for which facts predict the grade — and that is the model's whole relationship to this table. The gradebook's final-grade column also has a machine-learning name, and it is the most important word on this page.
The Label — the Answer Column
One column is different in kind from all the others: the one holding what actually happened — the 41 minutes. That column is the label: the answer we want the model to learn to predict. For past deliveries the label is known, because the courier eventually arrived and the app wrote down when. For a new order it is blank — and filling in that blank is the model's entire job.
Features in, label out. Learning from examples where the answer is known, in order to predict it where it isn't, has a proper name — supervised learning — which Chapter 4 introduces alongside its siblings. For now, notice something quieter: the label is not a special kind of data. It is an ordinary column that we chose. Ask a different question — "will this customer order again next month?" — and a different column of the same table becomes the label.
A Dataset Is Just Many Rows
The whole thing — rows, features, and label together — is a dataset: a collection of recorded examples assembled to answer one question. The word gets pronounced with weight in meetings, but there is no hidden depth to it. Plateful's delivery dataset is a table you could open in a spreadsheet program, scroll through, and read. The mystique of "big data" is in the volume, never the format.
What the dataset does carry is a ceiling. A model trained on this table can never know more than the table contains — not about districts missing from it, not about facts nobody recorded as columns. The rest of this chapter takes that sentence seriously: where the rows come from, what shape they arrive in, and what happens when the table lies. First, though, a broader look — because not all of Plateful's data sits in tidy rows of numbers, and models can eat more than tables.
- "Training data means huge, incomprehensible streams of numbers." Usually it is a plain table a person can open and read. The scale is unusual — two million rows — but the format is the most ordinary object in office life.
- "Features and labels are different kinds of data." Same table, same columns. The label is simply the one column we decided to predict; pose a different question and a different column takes the label's chair.
- "More columns always make a better model." Chapter 3 will show that irrelevant features add noise rather than knowledge. More rows of honest examples is the safer thing to wish for.
- "What are the rows, what are the features, what's the label?" is the first question a data scientist asks about any idea. From this page on, it's yours too — and it works on any ML proposal you'll ever hear.
- Every problem this book follows — delivery times, fake reviews, fraud, churn — starts life as exactly this table. Learn its anatomy once and you've learned it for all of them.
Knowledge Check
Plateful wants a model that predicts whether a customer will order again next month. In the customer table, what is the label?
- The customer's name and email address
- Whether each past customer did, in fact, order again — the recorded answer
- The total number of rows in the table
- Whichever column the model decides is most informative once training begins
In the delivery dataset, what is a feature?
- One recorded fact about a delivery — distance, hour, restaurant
- Something the app can do for customers, such as live courier tracking on a map
- The number of minutes the delivery actually took, recorded after the fact
- The one column the model pays the most attention to while learning
Which of these best describes a dataset?
- A program that turns inputs into predictions
- A written summary of what the data team learned from the examples
- Recorded examples, usually a table of rows with features and a label, gathered for one question
- A stream of numbers too large and too raw for any human to read
The team switches from predicting delivery time to predicting whether an order will be cancelled. What changes about the table?
- Nothing can change — the label is fixed by the data itself
- A different column becomes the label — much of the table stays
- The whole table must be discarded and new data collected from scratch, since each table answers only one question forever
- All the feature columns must be converted into labels
You got correct