Evaluating regression models
Regression models are quite different from classification models since the outcome of the model is a continuous number. Therefore, the metrics around regression models aim to monitor the difference between real and predicted values.
The simplest way to check the difference between a predicted value (yhat) and its actual value (y) is by performing a simple subtraction operation, where the error will be equal to the absolute value of yhat – y. This metric is known as the Mean Absolute Error (MAE).
Since you usually have to evaluate the error of each prediction, i, you have to take the mean value of the errors. Figure 7.8 depicts formula that shows how this error can be formally defined:
Figure 7.8 – Formula for error of each prediction
Sometimes, you might want to penalize bigger errors over smaller errors. To achieve this, you can use another metric, known as the Mean Squared Error (MSE). The MSE...