B2 · How Artificial Intelligence Works: Data and Learning

Good Data and Bad Data

Good data is accurate, complete, varied and relevant to the task. Bad data has problems such as too few examples, wrong labels, missing values, duplicates or a one-sided mix, and a model trained on it learns those problems.

8 min Beginner Jump to the activity

What you need: Nothing. This page starts from the beginning, with no programming and no formulas.

Definition

What if half the labels in your examples were wrong?

Good data is accurate, complete, varied and relevant to the task. Bad data has problems such as too few examples, wrong labels, missing values, duplicates or a one-sided mix, and a model trained on it learns those problems.

In simple words

Engineers say "garbage in, garbage out". If you teach a model with photos where some cats are labelled dogs, it will learn the wrong thing. If all your dog photos are taken in sunshine, it may think 'sunny' means 'dog'. Checking the data is as important as building the model.

Why it matters

Most AI failures in the real world trace back to the data, not the model. Learning to spot data problems early saves time and prevents unfair or dangerous mistakes later.

How it works

ProblemExampleWhat the model learns
Too little dataOnly 5 photos of each animalA weak, unreliable pattern
Wrong labelsSome cats marked as dogsConfused answers
Missing valuesSize left blank for many animalsGaps in its knowledge
DuplicatesThe same photo added ten timesToo much weight on one case
One-sided dataOnly big dogs, never small onesMistakes on whatever is missing

Try it yourself

Clean a messy dataset

A shop wants to predict sales. See what's wrong with its data before training.

Find the problems in a dataset

Each row comes from a dataset for a fruit-sorting model. What is wrong with it, if anything?

  • Orange, 155 g, bumpy skin. Label: apple

  • Red, 150 g, smooth skin. Label: orange

  • Row 7 is exactly the same as row 6

  • Green, 140 g, smooth skin. Label: apple

  • Orange, ___ g, bumpy skin. Label: orange

Common mistakes

  • Assuming data is correct because a computer stored it.
  • Collecting data only from what is easy to find.
  • Fixing the model when the real problem is the data.

Check yourself

Question 1

1. What does 'garbage in, garbage out' mean?

Question 2

2. All dog photos were taken in sunshine. What might the model learn?

Question 3

3. The same photo appears ten times. This is…

Summary

  • Good data is accurate, complete, varied and relevant.
  • Watch for wrong labels, missing values, duplicates and one-sided data.
  • Most AI failures come from data problems.

Finished reading?

Sources: Google Machine Learning Crash Course