Regression evaluation metrics measure how accurately a model predicts continuous numerical values. Unlike classification metrics, which evaluate category assignments, regression metrics generally examine the magnitude of prediction errors.
Mean absolute error (MAE) calculates the average absolute difference between actual and predicted values. It is easy to interpret because it uses the same measurement units as the target variable. Mean squared error (MSE) calculates the average squared difference. Squaring gives larger errors a stronger influence and produces a value in squared units. Root mean squared error (RMSE) is the square root of MSE, returning the measurement to the target's original units.
The coefficient of determination, R-squared, compares the model's residual sum of squares with the total variation in the observed target values. In the standard regression setting with an intercept, it describes the proportion of observed variance accounted for by the model relative to predicting the sample mean. An R-squared value closer to 1 indicates a better fit under this comparison, but R-squared alone does not establish that a model is appropriate or unbiased. It can also be negative on evaluation data when the model performs worse than the mean-baseline predictor.
Metric selection depends on the problem. MAE may be suitable when errors should be treated proportionally. RMSE is useful when large errors should receive greater emphasis. R-squared provides a relative fit measure but should be considered alongside error metrics and residual analysis.
Regression Evaluation Metrics
Regression evaluation metrics measure the difference between predicted and actual numerical values. Common metrics include mean absolute error, mean squared error, root mean squared error, and the coefficient of determination.
MAE = (1/n)Σ|yᵢ − ŷᵢ|; MSE = (1/n)Σ(yᵢ − ŷᵢ)²; RMSE = √MSE; R² = 1 − [Σ(yᵢ − ŷᵢ)² / Σ(yᵢ − ȳ)²]
Explanation
Variables
| Symbol | Meaning |
|---|---|
n | Number of observations |
yᵢ | Actual value of observation i |
ŷᵢ | Predicted value of observation i |
ȳ | Mean of the actual target values |
MAE | Mean absolute error |
MSE | Mean squared error |
RMSE | Root mean squared error |
R² | Coefficient of determination |
Example or application
A model predicts the delivery times of three orders as 30, 40, and 50 minutes. The actual delivery times are 32, 38, and 55 minutes. The absolute errors are 2, 2, and 5 minutes, so MAE is 3 minutes. The squared errors are 4, 4, and 25, so MSE is 11 minutes squared and RMSE is approximately 3.32 minutes.
Text
Regression metrics evaluate the accuracy of numerical predictions. MAE measures the average absolute prediction error, while MSE averages squared errors and penalizes large errors more strongly. RMSE is the square root of MSE and uses the original target units. R-squared compares the model's residual error with the variation around the observed mean. No single metric is ideal for every regression problem, so metric selection should reflect the practical meaning of prediction errors.
Key Points
Regression metrics evaluate numerical prediction errors.
MAE measures average absolute error in the target's units.
MSE gives larger errors greater influence through squaring.
RMSE returns the error measurement to the target's original units.
R-squared compares residual error with variation around the target mean.
R-squared can be negative on evaluation data.
Residual analysis helps reveal patterns that summary metrics may hide.
Applications
House price prediction
Weather forecasting
Sales and demand forecasting
Energy consumption prediction
Estimating delivery times
Predicting industrial measurements
Learning Outcomes
Explain the purpose of common regression metrics.
Calculate MAE, MSE, and RMSE from prediction errors.
Interpret R-squared and its limitations.
Select regression metrics according to the practical cost of errors.
Practice Questions
How does MAE differ from MSE?
Why is RMSE often easier to interpret than MSE?
Can R-squared be negative on test data?
Related Concepts
Linear Regression
Residual Analysis
Loss Functions
Model Evaluation
Coefficient of Determination
Common Mistakes
Comparing MSE values without considering the target's units and scale.
Assuming R-squared alone proves that a model is reliable.
Treating R-squared as necessarily restricted to values between zero and one on unseen data.
Sources and verification
Sources are shown as provided in the project data. Not every source has yet been independently verified. Please report errors or missing citations.
- Hastie, T., Tibshirani, R., and Friedman, J. (2009). The Elements of Statistical Learning. Springer.
- Willmott, C. J., and Matsuura, K. (2005). Advantages of the Mean Absolute Error over the Root Mean Square Error in Assessing Average Model Performance. Climate Research.
Suggest a correction or source · More in Artificial Intelligence & Machine Learning