Evaluating regression models
In our hello world example from Chapter 2, Introduction to TensorFlow, we tried to predict a student’s test score when the student spent 38 hours studying during the term. Our study model arrived at 81.07 marks, while the true value was 81. So, we were close but not completely correct. When we subtract the difference between our model’s prediction and the ground truth, we get a residual of 0.07. The residual value could be either positive or negative, depending on whether our model overestimates or underestimates the predicted result. When we take the absolute value of the residual, we eliminate any negative signs; hence, the absolute error will always be a positive value, irrespective of whether the residual is positive or negative.
The formula for absolute error is as follows:
Absolute error = |Y pred − Y true|
where Y pred = the predicted value and Y true = the ground truth.
The mean absolute error...