# Data is everything · AI in Bed

Beginner level · 5 min · https://www.aiinbed.com/learn/beginner/data-is-everything

*A model is only as good as what it learned from. Splits, bias, and why "garbage in, garbage out" still rules.*

Engineers joke that machine learning is 80% data cleaning and 20% complaining about data cleaning. It's funny because it's true: the data shapes everything a model will ever know.

### Never grade with the practice questions

If a student sees the exam answers while studying, a perfect score proves nothing.

So we **split** data: most for training, some held back to check progress (validation), and some locked away for a final honest exam (test).

*Figure: A common split. The test set is only opened once, at the very end.*

**Quick check:** Why do we keep a separate test set?

A. To make training faster
B. To measure how well the model handles data it has never seen
C. Because the test data is better quality
D. To store backups

Answer: B. The goal is to work on new, real-world data. Testing on unseen data is the honest way to estimate that.

### Garbage in, garbage out

Wrong labels, duplicates, and missing values all teach the model wrong lessons.

A smaller clean dataset often beats a bigger messy one.

### Bias in, bias out

If a hiring model learns from past decisions that were unfair, it learns to be unfair too, and does it at scale.

If a face-recognition dataset is mostly one skin tone, it will work worse for everyone else. Real systems have failed exactly this way.

> Pillow thought: always ask "who is missing from this data?" It's one of the most useful questions in all of AI.

### Features

The pieces of information we feed a model are called **features**: for a house, things like size, location and age.

Deep learning can learn its own features from raw data (pixels, words), which is a big reason it took off.

**Quick check:** A loan model was trained only on applicants from big cities. What's the most likely problem?

A. It will be too slow
B. It may make poor or unfair predictions for rural applicants
C. It will refuse to run
D. Nothing, data location doesn't matter

Answer: B. Models struggle with groups they rarely saw during training. Unrepresentative data leads to unreliable or biased results.

**Key takeaways**

- Split data into train / validation / test, and keep the test set untouched.
- Data quality usually matters more than data quantity.
- Biased data produces biased models; ask who is missing.

**Go deeper (free sources)**

- [ML Crash Course: Working with data & Fairness](https://developers.google.com/machine-learning/crash-course) by Google
- [Datasheets for Datasets](https://arxiv.org/abs/1803.09010) by Gebru et al.
- [Ethics of AI (free course)](https://ethics-of-ai.mooc.fi/) by University of Helsinki
