This section provides an overview of the metrics used in machine learning regression projects. Regression is a fundamental concept in machine learning, where the goal is to predict a continuous outcome variable based on one or more input variables.
Common Regression Metrics
Mean Absolute Error (MAE): It measures the average magnitude of the errors in a set of predictions, without considering their direction.
- Formula: $ \text{MAE} = \frac{1}{N} \sum_{i=1}^{N} |y_i - \hat{y}_i| $
- $ y_i $ is the actual value, and $ \hat{y}_i $ is the predicted value.
Mean Squared Error (MSE): It provides a measure of the average of the squares of the errors, giving more weight to larger errors.
- Formula: $ \text{MSE} = \frac{1}{N} \sum_{i=1}^{N} (y_i - \hat{y}_i)^2 $
- Similar to MAE, but MSE penalizes larger errors more.
Root Mean Squared Error (RMSE): It is the square root of the mean squared error and is in the same units as the data.
- Formula: $ \text{RMSE} = \sqrt{\text{MSE}} $
- RMSE is more intuitive to interpret than MSE.
R-squared (R²): It indicates the proportion of the variance in the dependent variable that is predictable from the independent variable(s).
- Formula: $ R^2 = 1 - \frac{\sum{(y_i - \hat{y}_i)^2}}{\sum{(y_i - \bar{y})^2}} $
- A value of 1 indicates that the model explains all the variability of the response data around its mean.
Further Reading
For more information on machine learning regression and metrics, please refer to the following resources: