Metrics are the most important factors affecting the models. These are the ways to evaluate the model and the progress of the model. In classification algorithms there are various metrics that are used to evaluate the models. Some of them are Confusion matrix, accuracy, precision, recall, F1 score, AUC, ROC etc.
Confusion Matrix:
This is a classification metric that is used to know the performance of the classification model. It is a visual technique to check on the performance. It is built on the predictions versus the actual values. It is represented as the figure below.
Predicted Values | Predicted Values | |
Actual Values | True Positive | False Negative |
Actual Values | False Positive | True Negative |
This is the visual representation. From these columns we can calculate the precision, recall, and accuracy of the classification model.
- Accuracy is number of predictions to the total number of predictions.
- Precision is the correct number of predicted samples to the total number of predicted samples.
- Recall is the correct number of predicted samples to the total number of actual samples.
- F1 score can also be calculated using these factors. It is basically the harmonic mean of precision and recall that are also calculated by these methods.
AUC:
It is also known as Area under curve. It measures the performance of a binary classifier on all possible values.
ROC:
It shows the graph of true positive rate against the false positive rate at the threshold values.
Log Loss:
It is the most important metric for classification, it is based on probabilities. It is difficult to catch the log loss from the classified model. Mathematically meaning is the negative average of the log of the corrected predicted probabilities for each instance.