The gap between a model's predicted values and the actual observed outcomes.
Prediction error quantifies how far a machine learning model's outputs deviate from the true values it was trained or evaluated against. It serves as the fundamental signal that drives learning itself — during training, algorithms adjust their internal parameters specifically to reduce this discrepancy. Prediction error is not a single metric but a family of related measures, including mean squared error (MSE), mean absolute error (MAE), cross-entropy loss, and others, each suited to different problem types. Regression tasks typically use squared or absolute error, while classification problems rely on probabilistic losses like cross-entropy that penalize confident wrong predictions more heavily.
The mechanics of how prediction error is used depend on the learning paradigm. In supervised learning, error is computed by comparing model outputs to labeled ground truth, then propagated backward through the network via gradient descent to update weights. This iterative error-reduction process is the engine behind nearly all modern deep learning. The choice of error metric is consequential: MSE penalizes large errors disproportionately due to squaring, making it sensitive to outliers, while MAE treats all deviations linearly. Selecting the wrong loss function can lead a model to optimize for the wrong objective entirely.
Prediction error also plays a diagnostic role beyond training. Evaluating error on held-out test data reveals whether a model has generalized or merely memorized its training examples. A large gap between training error and test error signals overfitting — the model has learned noise rather than signal. Conversely, high error on both sets indicates underfitting, where the model lacks the capacity to capture underlying patterns. This bias-variance tradeoff, formalized through the decomposition of expected prediction error into bias, variance, and irreducible noise components, remains one of the most important frameworks for understanding model behavior.
Prediction error matters because it connects abstract model performance to real-world consequences. In medical diagnosis, a model's error rate translates directly to missed conditions or false alarms. In financial forecasting, it determines the reliability of risk estimates. Minimizing prediction error while maintaining generalization is the central challenge of applied machine learning, making it one of the field's most foundational and practically significant concepts.