presentsUNAIVERSE
The UN AI timeline

Learn AI /How Machines Learn /Regression

Regression

Detail

In five seconds

What it is

A supervised learning method that learns from example inputs and known target values to predict a numeric quantity for a new input.

In plain words

Regression learns from past examples to estimate a number for a new case.

An everyday example

A courier supervisor has a notebook of past deliveries in Nairobi, Rome and Dakar. For each parcel, the notebook records distance, time of day, weather and the actual delivery time in minutes. By comparing many past rows, the supervisor learns a pattern: longer distance usually adds time, rush hour adds more, and heavy rain adds even more. When a new parcel arrives, the supervisor uses that learned pattern to estimate the delivery time instead of guessing from memory.

Where the story stops working

A human supervisor may use judgement, outside knowledge and explicit rules. A regression model usually learns statistical relationships from data and does not reliably know why those relationships hold. Also, many regression models do not literally add fixed minutes in a simple way; some learn complex non-linear patterns that are harder to inspect than the notebook story suggests.

Remember thisRegression predicts how much, not which one.

This term is contested

The core idea is not heavily disputed, but the word is used differently across fields. In statistics, it often includes explanation of relationships between variables; in machine learning, it usually emphasises prediction of continuous values.

Understand it

Understand it

Why it matters

Regression matters because many real decisions depend on estimating amounts: time, cost, demand, risk level, pollution, rainfall or case volume. If you hear that a system predicts a number, regression may be involved. Knowing this helps you ask the right questions: What was the target value? Which features were used? How large was the error on validation data? Are the predictions reliable across places, seasons or population groups? A regression output can look precise, but it is still an estimate shaped by data quality, measurement choices and assumptions. For programme staff and technical teams, that difference matters when planning resources, setting thresholds or interpreting trends.

How regression learns from examples and produces a numeric estimate

Show that regression takes features and known numeric targets during training, adjusts model parameters to reduce error, and later outputs a continuous prediction for a new case.

  1. 01

    1. Training data

    Start with many examples. Each example has features such as distance and weather, plus a known numeric label such as delivery time in minutes.

    Draw a box containing three small rows like a table. Each row has feature chips on the left and a numeric label on the right. Add a caption: features + known value.

  2. 02

    2. First guesses

    The model makes initial predictions for those examples. At first, they may be far from the known values.

    Draw an arrow to a model box. From the model, draw predicted numbers beside each training row. Show visible mismatch between predicted and known values.

  3. 03

    3. Reduce error

    A training procedure measures the difference between predicted and known values and updates model parameters to make future predictions closer.

    Draw a feedback loop around the model labelled measure error and update parameters. Show the mismatches shrinking after one or two iterations.

  4. 04

    4. Learned mapping

    After training, the fitted model captures a relationship between features and the target value.

    Draw the model box in a stable state with a label: fitted regression model.

  5. 05

    5. New case

    A new input with the same kinds of features goes into the fitted model, which returns one estimated continuous value.

    Draw a fresh feature row entering the fitted model and one output number, for example 42 minutes.

A left-to-right flow diagram with four stages: training examples, model fitting, learned mapping and new prediction. Read it from left to right. The top row shows past examples with inputs and known numbers. The middle shows error being measured and parameters being adjusted. The final stage shows a new input producing one estimated value.

Hover or tap each stage to highlight the current inputs, outputs and parameter updates; include a toggle to show a straight-line fit versus a curved fit.

Describe this without the diagram

This diagram explains regression as a five-step flow. First, there are training examples, where each case includes input features and a known numeric target, such as delivery time in minutes. Second, a model produces initial predictions for those same examples. Third, the system compares each prediction with the known value, measures the error, and updates internal parameters so the error becomes smaller. Fourth, after repeated updates, the model becomes a fitted mapping from features to a number. Fifth, when a new case arrives with the same kinds of features but no known target yet, the fitted model outputs one estimated continuous value. The main point is that regression learns from examples with known numbers and later predicts a number for a new case.

With reduced motion: Show the same five stages as a static left-to-right diagram with two snapshots in the error-reduction stage: one with larger gaps between predicted and known values, and one with smaller gaps. No animated looping is needed.

Regression is used when you want a model to output an amount, not a category. For example, you might want to estimate travel time in minutes, crop yield in tonnes, or next month’s electricity demand. The input variables are called features, and the target value you want to predict is often called the label.

During training, the model sees many examples where both the features and the recorded target values are available. Many regression methods adjust internal parameters so their predictions get closer to those values. Other methods fit or store the examples in different ways.

What goes in is a set of training examples: for each case, the features and the known numeric outcome. What changes inside is the fitted model, often including parameters updated to reduce prediction error. What comes out is a function that can take a new case and return an estimated value.

Regression is often confused with classification. Classification predicts a class such as approved or not approved, damaged or not damaged. Regression predicts a quantity such as 2.4, 17 days, or 83.5 per cent. Some methods can be adapted for both, but the goal and output type are different.

How “Estimating parcel delivery time from past trips” maps onto the real thing

In the storyIn the AI system
Notebook of past deliveries with conditions and actual minutesTraining examples with features and known labels
Distance, time of day and weatherFeatures used as inputs
Actual delivery time in minutesNumeric target value or label
Learned pattern for adding or reducing minutesRegression model parameters fitted during training
Estimate for a new parcelPrediction at inference time

A worked example

Estimating apartment rent from size and distance to the city centre

Starting from: Training examples: (40 square metres, 8 km) → 520; (55, 5) → 760; (70, 3) → 980; (85, 2) → 1210. New case: (60, 4).

  1. Choose features: apartment size and distance to the city centre, with monthly rent as the numeric label.
  2. Fit a regression model on past examples so predicted rents are as close as possible to the known rents.
  3. The fitted pattern learns that rent tends to rise with size and fall as distance increases, based on the data provided.
  4. Enter the new case, 60 square metres and 4 km, into the fitted model.
  5. The model outputs an estimated rent of about 830 in the local currency.

Result: The output is a numeric estimate, not a class label. If the estimate is used for a real decision, it should be checked against local context and possible bias in the training data.

In a United Nations workplace

A security analyst in a specialised agency's technical division is finalising the briefing note due at 6pm. Using approved records of earlier software vulnerabilities, with features such as severity, affected systems, patch availability and staffing, they apply regression to predict the hours needed to remediate a newly logged vulnerability.

Regression learns from earlier cases whose actual remediation times are known, then returns a numeric estimate for the new case. That estimate can inform the duty roster and the briefing note, while remaining an estimate rather than a deadline disguised by a decimal place.

Before you try thisVulnerability records are security-sensitive. Do not enter system names, network details, logs or exploitable weaknesses into a tool that is not approved for that material, as disclosure could facilitate compromise. Credentials must not be used as model inputs at all. Use minimised features in an approved environment, test prediction error and retain human review.

Where you may hear it

  • At an ICT governance board reviewing a forecasting model
  • During a procurement unit's vendor demo, when predicted values are compared with actuals
  • During clearance of a monitoring report containing numeric forecasts
  • At an evaluation office methods meeting on analysing programme results

Avoid confusion

Avoid confusion

Often confused with

Common misconceptions

  • Common misconception: Regression only means fitting a straight line.

    Correction: Linear regression is one important type, but regression as a broader idea means predicting a continuous value. The relationship can be linear or non-linear depending on the method and the data.

  • Common misconception: Regression gives exact answers if there is enough data.

    Correction: More data can help, but predictions still depend on how noisy the target is, whether the features are informative, and whether future cases resemble the training data. Real-world outcomes often vary for reasons the model cannot observe.

  • Common misconception: If the output is a score between 0 and 1, it must be regression.

    Correction: Not necessarily. Some classification models output scores or probabilities between 0 and 1 for class membership. The key distinction is the task: regression predicts a continuous quantity, while classification predicts a category.

  • Common misconception: A low average error means the model is fair and safe to use everywhere.

    Correction: Average performance can hide weak performance for specific regions, time periods or groups. A regression model should be checked across relevant subgroups and operating conditions, not only with one overall metric.

Quick check

Which task is a regression task?

Go deeper

Go deeper

The simple version

Regression learns from past examples to estimate a number for a new case.

The technical version

In supervised learning, regression fits a function from input features to a continuous target variable using labelled examples. Training optimises model parameters to minimise a loss function that measures prediction error, such as mean squared error or mean absolute error. Depending on the method, the fitted function may be linear, piecewise, kernel-based, tree-based or a neural network. At inference time, the model applies that learned mapping to unseen inputs and returns a numeric prediction. In statistics, the word can also refer more broadly to modelling relationships between variables for explanation as well as prediction, so the exact emphasis depends on context.

Reviewed external resources

  • EncyclopaediaRegression analysis (opens in a new tab)Wikipedia

    Wikipedia gives a broad overview of regression analysis and its main ideas, which suits readers who want background and terminology.

    Intermediatelink checked 2026-07-31

  • CourseMachine Learning Crash Course (opens in a new tab)Google

    Google's Machine Learning Crash Course gives practical teaching material on machine learning concepts, which suits readers who want applied learning.

    Intermediatelink checked 2026-07-31

  • VideoStatQuest (opens in a new tab)StatQuest with Josh Starmer

    StatQuest offers video-style explanations that many learners find clear for statistics and machine learning topics, which suits readers who prefer guided walkthroughs.

    Starterlink checked 2026-07-31

  • VideoVideo explanations: Regression (opens in a new tab)YouTube search

    This YouTube search results page helps readers find multiple video explanations of regression, which suits people comparing teaching styles rather than looking for one specific source.

    search results, not one pagelink checked 2026-07-31

  • DiscussionCommunity discussion: Regression (opens in a new tab)Reddit search

    This Reddit search results page helps readers find community discussions and questions about regression, which suits readers who want informal explanations and common points of confusion.

    search results, not one pagelink checked 2026-07-31

Where this came from

Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.

The one thing to remember

Regression predicts how much, not which one.