Mean Absolute Error (MAE) Flashcards
Mean Absolute Error (MAE)
Mean Absolute Error (MAE) is a popular loss function used for regression problems in machine learning. It calculates the average of the absolute differences between the actual and predicted values, providing a simple and intuitive quantification of prediction error.
- Definition
Mean Absolute Error (MAE) is a measure of errors between paired observations expressing the same phenomenon. It is calculated as the average absolute difference between the actual and the predicted values.
- Mathematical Formulation
For ‘n’ data points, MAE is calculated as: MAE = (1/n) * Σ|Pi - Yi|, where Pi represents the prediction by the model, Yi is the actual value, and the summation is over all data points.
- Use in Regression Problems
MAE is commonly used as a loss function for regression problems, where the goal is to predict a continuous output variable. It can be used in various types of regression models, such as linear regression, decision tree regression, or support vector regression.
- Interpretability
MAE has a clear and straightforward interpretation. It represents the average magnitude of error in a set of predictions, without considering their direction. It’s measured in the same units as the data, making it relatively easy to understand.
- Robustness to Outliers
Unlike Mean Squared Error (MSE), MAE is more robust to outliers in the data. While MSE squares the differences, causing larger errors to contribute more to the total error, MAE treats all errors equally, meaning it is less influenced by outliers.
- Optimization
In terms of optimization, MAE may be more difficult to optimize than MSE, as it requires specialized algorithms for computing gradients since the absolute value function is not differentiable at zero. However, many modern machine learning libraries and software have robust support for MAE optimization.
- Trade-offs
One trade-off of MAE is that because it uses the absolute value of the residual, it may not adequately reflect the performance when dealing with both large and small errors. For instance, an MAE of 1 might mean mostly small errors for a range of [0, 10], but mostly large errors for a range of [0, 1].