AI Foundations for Students | 013. Features, Labels and Data Quality
AI Foundations for Students · Lesson 13 of 36
Module 3: Machine Learning on Paper
In this lesson
Learning goal: Define examples, features and labels; audit a small fictional dataset.
A row is an example
We can explore machine learning without collecting information about people. Imagine fictional paper envelopes that a club sorts into small and large display pockets. Each envelope has a width measured in centimeters and a reference pocket label assigned by the activity designer. A dataset is a collection of such examples. In a simple table, one row represents one envelope and columns describe recorded properties.
A feature is information used as input to a model, such as width. A label is the target answer used in a supervised-learning example, such as the reference category small or large. A row identifier like E1 helps track an envelope, but it is not automatically a useful predictive feature. Choosing columns requires thinking about the task rather than using everything available.
A complete fictional dataset to audit
The initial records are E1: width 8 cm, label small; E2: width 12 cm, label large; E3: width 9 cm, label small; E4: width blank, label large; E5: width 110 mm, label large; E6: width 8 cm, label small, noted as a duplicate record of E1. For this activity, the reference labeling policy says widths below 10 cm are small and widths of 10 cm or more are large.
The dataset has several quality issues. E4 is missing the feature needed by the rule. E5 uses a different unit. E6 is a duplicate of the same object, not a new independently measured envelope. These problems matter even before choosing a model. A table with six rows does not necessarily contain six distinct, usable examples.
Repair records without inventing evidence
For E5, convert units: ten millimeters equal one centimeter, so 110 mm equals 11 cm. Record the conversion rather than replacing the value without explanation. For E4, do not guess a width because the label is large. Mark the value missing and decide whether to remeasure the fictional card or exclude it from a width-based exercise. Using the label to fabricate an input would corrupt the task.
For E6, preserve a note that it duplicates E1 and count the object once in an independent-example analysis. Duplicate handling depends on context; two genuinely different envelopes can share a width. Identical measurements alone do not prove duplication. Here the explicit duplicate note establishes that E6 is the same object. This distinction prevents deleting valid repeated observations by mistake.
Coverage and label meaning
The reference categories describe pockets in this invented activity, not universal meanings of small and large. A different project might choose a different threshold. Labels need a documented definition so people can apply them consistently. For a borderline width of exactly 10 cm, the stated policy places it in large. If that equality rule were omitted, different labelers might disagree.
Also inspect coverage. Clean examples at 8, 9, 11 and 12 cm do not test the boundary at 10 cm or unusually wide envelopes. A model could appear successful on this easy sample while failing near the threshold. More rows are useful only when they add relevant information. Many duplicates of 8 cm do not replace a carefully chosen boundary example.
Keep a data note
A short data note should state what each row represents, units, label policy, origin, missing values, duplicates and intended use. Ours says all envelopes are fictional teaching examples and should not be used to claim performance on real postal or packaging tasks. No personal identifiers are required. That record helps another learner understand the table without relying on your memory.
This habit becomes more important as datasets grow. Errors are easier to prevent when fields and meanings are defined at the start. A neatly arranged table can still contain inconsistent units, wrong labels or gaps in coverage. Data quality is about fitness for a particular purpose, not just whether a file opens successfully.
Worked practice
Worked exercise 1: Identify the columns
Task: For the envelope task, identify the example, candidate feature, target label and record identifier.
Worked solution: The example is one fictional envelope. Width in centimeters is the candidate feature. The small-or-large pocket category is the target label. E1 or E2 is a record identifier for tracking. The identifier should not be used as a shortcut to memorize labels because new envelope IDs do not express width or pocket suitability.
Worked exercise 2: Normalize and count
Task: After converting E5, excluding the missing-width E4 from this exercise and counting duplicate E6 only once, list the usable independent widths.
Worked solution: E1 is 8 cm, E2 is 12 cm, E3 is 9 cm and E5 is 11 cm because 110 ÷ 10 = 11. There are four usable independent examples. Keep notes about E4 and E6 rather than pretending they never existed. This makes the cleaning decisions reviewable.
Worked exercise 3: Add a boundary case
Task: Create one fictional example that checks the stated equality condition. Give its label and explain.
Worked solution: Add E7 with width exactly 10 cm and label large. The policy says 10 cm or more is large, so equality belongs to that category. A 9.9 cm envelope would be small under the stated rule. These nearby cases reveal whether the comparison sign was implemented correctly.
Check your understanding
MCQ 1: Which field is the target label?
- Envelope ID
- Width
- Pocket category
- Measurement unit
Check the answer and explanation
Answer: C. The supervised target is the category the model is asked to predict.
MCQ 2: What is 110 mm in centimeters?
- 1.1 cm
- 11 cm
- 110 cm
- 1100 cm
Check the answer and explanation
Answer: B. Divide millimeters by ten to obtain centimeters.
MCQ 3: How should the missing width be handled here?
- Guess it from the large label
- Copy another envelope’s width
- Treat blank as zero without a note
- Mark missing and remeasure or exclude with a record
Check the answer and explanation
Answer: D. Inventing the input would hide uncertainty and distort evaluation.
MCQ 4: What proves E6 is a duplicate object?
- The explicit note that it repeats E1
- Its width alone
- Its small label alone
- Its position as the last row
Check the answer and explanation
Answer: A. Different real objects can share measurements, so the duplicate note is essential.
MCQ 5: What label applies to exactly 10 cm?
- Small
- Large
- Neither category
- Whichever label is more common
Check the answer and explanation
Answer: B. The documented policy assigns widths of 10 cm or more to large.
Sources and further reading
- Google: What is Machine Learning?: Basic model and supervised-learning terminology. Verified 11 October 2026.