- Hands-On Predictive Analytics with Python
- Alvaro Fuentes
- 206字
- 2025-04-04 15:18:28
Metrics for the model
How are we going to evaluate how good our model is? To answer this question, in predictive analytics we usually use metrics. Since we are dealing with a regression problem, and there are many standardized metrics that are routinely used for these problems, we will usually use one or some of these metrics and evaluate our model. We must choose a metric that is appropriate for our problem, but sometimes none of the standard metrics will be useful, so it may be that we need to build our own personalized metric or metrics.
The logic behind almost all of the standard metrics is very straightforward:
- If the predictions are close to the actual (real) values then that is considered good
- Conversely, if the prediction is far away from the real value then that is not good
The mathematical formulas that define all of the metrics are based on this principle.
For now, let's just say that the metrics for model evaluation will be chosen in such a way that the model will try to minimize the difference between the predicted and the actual prices; in other words, we will try to build a model that is as accurate as possible.