🇬🇧 Limited Time — UK Only·🎓 Free Learning for 1 Month·🤖 Free AI Training Included·📚 4,000+ Lessons · 35,000+ Quizzes·🏆 GCSE Mocks · Olympiad Papers·⚡ Selected Students Only · Limited Places·🎁 Free Value Worth £2,000·🇬🇧 Limited Time — UK Only·🎓 Free Learning for 1 Month·🤖 Free AI Training Included·📚 4,000+ Lessons · 35,000+ Quizzes·🏆 GCSE Mocks · Olympiad Papers·⚡ Selected Students Only · Limited Places·🎁 Free Value Worth £2,000·🇬🇧 Limited Time — UK Only·🎓 Free Learning for 1 Month·🤖 Free AI Training Included·📚 4,000+ Lessons · 35,000+ Quizzes·🏆 GCSE Mocks · Olympiad Papers·⚡ Selected Students Only · Limited Places·🎁 Free Value Worth £2,000·
🤖 AI & ML

Simple prediction rule

A very simple 'model' is a rule we write by hand. For example: if score >= 80 then predict 'pass'. Machine learning later learns such rules from data. Here we write a small rule and use it on a few examples.

3 min 10 XP Lesson 2 of 20
Simple prediction rule
🌐

Appy Says…

A spam filter doesn't know what spam is — it's learned from millions of examples. A price predictor doesn't have a formula — it's found patterns in data. Simple prediction is AI's simplest superpower: look at past data, predict future values.

📖

What is Simple Prediction in AI?

Prediction is using patterns in past data to output a value for new, unseen inputs. The simplest form is linear regression — finding the line that best fits a set of data points.

  • Input features → model → predicted output
  • Regression: predicts a continuous number (price, temperature, score)
  • Classification: predicts a category (spam/not-spam, cat/dog)
  • Training: showing the model labelled examples to find the pattern
  • Prediction: giving the trained model a new input to get an output
  • Accuracy: tested on data the model hasn't seen (test set)
🎮

Think of it like predicting a Minecraft biome from coordinates

If you plot a thousand Minecraft coordinates against their biome and temperature, you'd spot patterns — certain coordinates tend to be cold, others warm. A prediction model finds these patterns mathematically and generalises them to predict any new coordinate's climate.

⚙️

How It Works

  • 1. Collect labelled data: (input, correct output) pairs
  • 2. Split: 80% training data, 20% test data
  • 3. Train: model adjusts its parameters to minimise prediction error on training data
  • 4. Evaluate: measure error on test data (data the model hasn't seen)
  • 5. Predict: pass new input through the trained model → get prediction
  • 6. Common measure of error: Mean Squared Error (MSE) or accuracy %
🌍

Real-World Examples

  • Spotify: predicts how much you'll like a song based on listening history
  • Netflix: predicts your star rating for unwatched films
  • Amazon: predicts estimated delivery time based on location + carrier history
  • School: predicting exam performance from homework completion rate
💡

Key Facts

  • Linear regression is the simplest ML algorithm — it fits a straight line to data
  • Decision trees and random forests are easy-to-understand models for classification
  • Overfitting: model memorises training data but fails on new data — too complex for the dataset
  • More data almost always beats a more complex model for improving prediction accuracy
⚠️

Watch Out!

Never evaluate a model on the same data you trained it with — it will appear to have perfect accuracy (it just memorised the answers). Always hold back a test set. If test accuracy is much lower than training accuracy, the model is overfitting.

📌

Remember

Prediction = pattern from past data applied to new inputs. Train on labelled data, test on unseen data. Regression predicts numbers; classification predicts categories.

What You Learned

  • AI prediction: find patterns in labelled training data, apply to new inputs
  • Train/test split prevents overfitting; evaluate on data the model never saw
  • Unlocks: understanding how every recommendation system and classification AI works

Key Facts

  • Linear regression is the simplest ML algorithm — it fits a straight line to data
  • Decision trees and random forests are easy-to-understand models for classification
  • Overfitting: model memorises training data but fails on new data — too complex for the dataset
  • More data almost always beats a more complex model for improving prediction accuracy

Real-World Examples

• Spotify: predicts how much you'll like a song based on listening history • Netflix: predicts your star rating for unwatched films • Amazon: predicts estimated delivery time based on location + carrier history • School: predicting exam performance from homework completion rate

Remember

Prediction = pattern from past data applied to new inputs. Train on labelled data, test on unseen data. Regression predicts numbers; classification predicts categories.

Quick Quiz

1 / 2

What is a simple prediction rule?