Evaluation Metrics
Evaluating the performance of a linear regression model is crucial for ensuring its effectiveness in making predictions. Evaluation metrics allow us to quantify the model’s accuracy and identify areas for improvement. This chapter details the main metrics used to evaluate regression models.
7.1 Coefficient of Determination ()
The Coefficient of Determination, , is a metric that indicates the proportion of variability in the dependent variable that is explained by the independent variables in the model.
Calculation
is calculated as:
Where:
-
SSR is the sum of the squared differences between the observed and predicted values.
-
SST is the sum of the squared differences between the observed values and the mean of the observed values.
Interpretation
An of 1 indicates a perfect fit, whereas an of 0 indicates that the model explains none of the variability in the data. However, a high does not always indicate a good model, especially in multiple regression models, where overfitting may occur.
7.2 Mean Squared Error (MSE)
Mean Squared Error (MSE) is a metric that computes the average of the squared errors, or differences, between the observed and predicted values.
Calculation
MSE is given by:
Where are the observed values and are the predicted values.
Interpretation
A lower MSE indicates that the model fits the data better. However, MSE is sensitive to outliers because the errors are squared.
7.3 Root Mean Squared Error (RMSE)
Root Mean Squared Error (RMSE) is the square root of MSE and provides a measure of the magnitude of prediction errors.
Calculation
RMSE is calculated as:
Interpretation
RMSE is expressed in the same units as the dependent variable, making it easier to interpret. Like MSE, RMSE is sensitive to outliers, but it is often preferred due to its direct interpretability.
7.4 Mean Absolute Error (MAE)
Mean Absolute Error (MAE) is the average of the absolute differences between the observed and predicted values, providing a clear measure of the model’s average error.
Calculation
MAE is given by:
Interpretation
MAE is less sensitive to outliers than MSE or RMSE because it does not square the errors. It is useful for understanding the average error in the units of the predicted value.
7.5 Choosing a Metric
The choice of evaluation metric depends on the context and characteristics of the dataset. In scenarios where outliers are common, MAE may be more appropriate, whereas RMSE may be preferred when large errors are particularly undesirable.
7.6 Model Comparison
Using multiple metrics together can provide a more complete view of model performance. This helps strike a balance between fitting the data (bias) and model complexity (variance).