The ROC and AUC curve in Machine Learning is used to measure the performance of a binary classification model. In this article, I will explain to you what the ROC and AUC curve is in machine learning.

## ROC and AUC in Machine Learning

#### ROC Curve:

ROC stands for Receiver Operating Characteristic Curve, a graph that shows the performance of binary classification models. It is used to plot two parameters which are the true positive rate and the false positive rate:

- True Positive Rate = Total Positive / Total Positive + False Negative
- False Positive Rate = False Positive / False Positive + True Negative

The ROC curve is very similar to the precision and recall curve, but the difference is that instead of plotting the precision and recall curve, it plots the rate of true positives versus the rate of false positives.

In the figure above, the dotted line represents the ROC curve of a random classification model. A good classification model will stay as far from the dotted line as possible.

Also, Read – 200+ Machine Learning Projects Solved and Explained.

#### AUC:

AUC stands for Area under the ROC Curve. It calculates the entire two-dimensional area present under the ROC curve represented by the dotted line in the image above.

The AUC is between 0 and 1. A classification model with 100% bad predictions will have an AUC score of 0.0, while a classification model with 100% true predictions will represent the AUC score of 1.0.

### Summary

As the ROC curve is very similar to the precision and recall curve, you don’t have to know when to use ROC and AUC? So, as a general rule of thumb, you should use the precision and recall curve when the positive class is scarce in the dataset or when you care more about false positives than false negatives.

In all other situations, you can use the ROC curve. I hope you liked this article on what is ROC and AUC curve. Feel free to ask your valuable questions in the comments section below.