2️⃣

# 6.2 Eval. Metric 1: Mean Absolute Error

## Mean Absolute Error

(MAE = Mean Absolute Error)
Mean absolute error takes the absolute value of the difference between the correct output, designated by and the predicted output, symbolized by . The function then sums up this value for all the different examples, and divides it by the number of examples, , to calculate the average.

In case you don't understand the weird symbol, it's called a sigma or summation. The summation essentially adds up the value of the term inside over the different values of the variable mentioned (in this case ) between the value at the bottom and the value of the top. This means that will go from to , and we will add up all the resultant values.

The absolute value is there so that we don't make any difference between the following two scenarios:

1. The trendline or the predicted Y is greater than y, and the error is negative.
1. The trendline or the predicted Y is less than y, and the error is positive.

The absolute value will make all of these errors positive, so that we focus more on eliminating error rather than promoting one of the two kinds of errors.

⚖️