Welcome to the world of Machine Learning !
Here, You can read basic concepts of machine learning and enhance your level manifolds.

MAE

Mean Absolute Error (MAE) is a popular metric used to evaluate the accuracy of a model's predictions, typically in regression problems. It measures the average absolute difference between the actual and predicted values of the target variable.

The formula for calculating MAE is:
MAE = (1/n) * Σ|AV(i) - PV(i)|


where n is the number of samples in the dataset, AV(i) is the actual value of the target variable for the i-th sample, and PV(i) is the predicted value of the target variable for the i-th sample.

Example

Suppose we have a dataset that contains the weight and height of 10 individuals. We want to build a regression model that predicts the weight based on the height. Here is a sample dataset:

Sr.No.
Height(inches)
Actual Wt.
(Kgs.)
Pred-Wt.
(Kgs.)
(Actual-Predicted) wt.
= diff
absolute-diff
(ignore sign)
1 67 57 55 2 2
2 70 59 59 0 0
3 54 73 85 -12 12
4 60 82 92 -10 10
5 72 48 50 -2 2
6 56 50 50 0 0
7 71 59 58 1 1
8 56 64 63 1 1
9 65 70 70 0 0
10 57 79 78 1 1
-- -- -- -- Sum = 29

MAE = (Sum of absolute difference) / Count
MAE = 29 / 10
So, MAE = 2.9

This is the MAE for our regression model. It means that, on average, our model predicts the weight of an individual within +/- 2.9 Kgs. of the actual weight.

Advertisement

Advertisement