How to calculate Performance Measures by Measuring the Quality of a model.
- […] A. How to calculate Performance Measures by Measuring the Quality of a model. [10] […]
Performance measures are essential in evaluating the quality and effectiveness of a machine learning model. Different performance measures are used depending on the type of problem being solved (classification, regression, clustering, etc.). Here are some common performance measures and how to calculate them for different types of models:
A model's quality is measured by comparing its predictions with the true values on test data: for classification use the confusion matrix with accuracy, precision, recall and F1-score; for regression use MAE, MSE, RMSE and \(R^2\).
1. Classification: confusion matrix
| Predicted positive | Predicted negative | |
|---|---|---|
| Actual positive | TP | FN |
| Actual negative | FP | TN |
Example: TP = 40, FN = 10, FP = 5, TN = 45. Accuracy = 85/100 = 0.85; precision = 40/45 = 0.89; recall = 40/50 = 0.80; F1 = 2(0.89)(0.80)/(1.69) ≈ 0.84.
2. Regression (\(y_i\) actual, \(\hat{y}_i\) predicted, n points)
3. How to measure reliably
Log in or create a free account to answer this question.