Junior Codes
Pattern Valley

What Is Regression in Machine Learning? For Kids

Predict a number, not a category, from a pattern in the data.

Start Wonderwild free with Pip

Try 5 starter activities free. Full access is ₹499 a year.

This mission is part of full access. The first missions are free to try.

Regression, explained simply

Some models choose a label, like "berry" or "crystal". That is called classification. Other models predict a number, like a price, a temperature or a height. That is called regression.

A regression model looks at examples where both the clue and the answer are known, then finds a line or curve that fits them as closely as possible. For a new example, it reads the answer off that line.

Predictions work best inside the range of the training data. Ask about something far outside it, like a sunflower watered for a whole year when the data only covered a month, and the guess can be way off.

Example: Predicting sunflower height

  • Sunny days → height: 10 days → 40 cm, 20 days → 80 cm, 30 days → 120 cm.
  • The pattern: about 4 cm per sunny day.
  • Prediction for 25 sunny days: about 100 cm.

Try this

  • Measure a plant or your own height over several weeks and draw the points on graph paper. Can you draw a line through them?
  • Guess the price of a bigger pizza from the prices of smaller ones.
  • Think of a prediction that would be silly if you stretched the line too far.

Practise it in Wonderwild

“Predict the sunflower height”

Discovery 7 in Pattern Valley, one of 24 AI discoveries in Wonderwild.

Your child trains, tests and questions a small model in the browser with Pip. No coding needed. For ages 7+.

Start Wonderwild free with Pip

Try 5 starter activities free. Full access is ₹499 a year.

This mission is part of full access. The first missions are free to try.

Questions parents and kids ask

What is the difference between regression and classification?+

Classification picks a category, like cat or dog. Regression predicts a number, like how many centimetres a plant will grow.

Where is regression used in real life?+

Weather forecasts, estimated delivery times and predicting how busy a shop will be all use regression-style models.

Prefer learning with a teacher?

Our live AI Explorers course teaches these ideas in small online classes led by a software engineer, with projects and feedback. Every live course also includes 12 months of full Wonderwild access for practice.

See the AI Explorers course