# Examples, features, labels and data quality

> An example is one unit of observation. Features are inputs available at prediction time; a label is the target used for supervised learning.

Course: [AI foundations and responsible use](https://studybrix.com/en/courses/ai-foundations/index.md)
Level: school
Prerequisites: Tables, categories and averages.

## Notes

### Records

An example is one unit of observation. Features are inputs available at prediction time; a label is the target used for supervised learning.

### Quality

Missing values, inconsistent units, duplicate records and ambiguous labels can distort learning. Cleaning choices need documentation.

### Leakage

Information from the target or future must not enter features when it would be unavailable during actual prediction. Splits must respect linked records and time.

### Privacy

Use authorized, appropriate data and minimize personal information. Synthetic examples in this course do not require uploading personal records.

## Practice questions

### 1. In supervised learning, what is a label?

A. Any decorative heading
B. Always the first feature
C. The target output for an example
D. A guarantee the record is correct

Answer: The target output for an example

Explanation: Labels specify what the model is trained to predict.

### 2. Which feature leaks future information when predicting tomorrow's sales today?

A. Known opening hours
B. Tomorrow's final sales total
C. Today's calendar date
D. Past sales available today

Answer: Tomorrow's final sales total

Explanation: The final target would not be known at prediction time.

### 3. A table has 200 records and 10 exact duplicates to remove. How many records remain?

Answer: 190

Explanation: Subtract removed records from total records.

### 4. What should be recorded when converting metres to centimetres in a feature?

A. Only a model name
B. Nothing if the numbers look bigger
C. Only a new file colour
D. The transformation and resulting units

Answer: The transformation and resulting units

Explanation: Units and transformations affect interpretation and reproducibility.

### 5. Why can two rows from the same person in both train and test sets distort evaluation?

Sample answer / marking guidance: The model may exploit person-specific information shared across splits. Evaluation can become easier than generalizing to new people.

Explanation: Credit linked records and a split matched to deployment.

### 6. Of 80 records, 20 lack a given feature. Find its missing fraction.

Answer: 0.25

Explanation: 20/80=0.25.

### 7. Give two checks before using a dataset for an AI learning exercise.

Sample answer / marking guidance: Check permission and privacy suitability, examine units and missingness, inspect label definitions, and define a leakage-safe split.

Explanation: Credit any two concrete checks.

### 8. Should a missing numeric value always be replaced by zero without thinking?

A. Yes, zero is universally correct
B. Only when the table is wide
C. Only when the model is large
D. No

Answer: No

Explanation: Zero can have a genuine meaning; missing-data handling must fit the task.

## Further reading

- https://developers.google.com/machine-learning/crash-course
- https://cs229.stanford.edu/

Original AI-assisted educational draft; not independently teacher-reviewed. References support further study, not copied exercises, affiliation or curriculum accreditation.
