Defining loss functions and evaluation metrics for regression
In the previous recipe, we defined our input features, described our model, and initialized it. At that point, we passed the features vector of a house to predict the price, calculated the output, and compared it against the expected output.
At the end of the previous recipe, the comparison of the expected output and the actual output of the model intuitively provided us with an idea of how good our model was. This is what it means to “evaluate” our model: we assessed the model’s performance. However, that evaluation is not complete for several reasons, as we did not correctly take into account several factors:
- We only evaluated the model on one house – what about the others? How can we take all houses into account in our evaluation?
- Is the difference between values an accurate measurement of model error? What other operations make sense?
In this recipe, we will cover how...