Regression

A task in which a model predicts a numeric value rather than a category.

How far off was the repair-time estimate?

A repair desk forecasts a clock restoration will take 9.5 hours. The work takes 11 hours. A regression model predicts a numeric quantity, so the direction, magnitude and units of the error matter.

Prediction
9.5 hours, based on the information available when the clock arrived.
Observation
11 hours of recorded work under the desk’s definition of repair time.
Residual
Using actual minus predicted, 11 − 9.5 gives +1.5 hours. The desk underestimated this job by an hour and a half.

What does an average hide?

Suppose another job is overestimated by 1.5 hours. The two signed residuals average to zero, while the mean absolute error is still 1.5 hours. The first statistic measures cancellation and the second describes typical error size for these two jobs.

Clockwork parts sit beside a mechanical timer.
A duration forecast and the observed work must use the same unit and definition.

What should accompany a forecast?

Specify the target and unit. Labor hours and calendar days answer different questions when jobs spend time waiting for parts. For staffing decisions, an uncertainty interval evaluated on comparable jobs can be more informative than a point estimate alone.

Follow the idea

Model Evaluation · Choose a measure that matches the forecast’s purpose.

Classification · Compare a numeric target with a categorical one.

Examples in the AI guides

More chapter examples (6)

Source · Google’s linear regression guide

Return to Regression in the A–Z glossary