ROC-AUC explained

Hello Friends, this is the first post (of multiple posts) for one of the most important classification metrics measurement ROC/AUC. The subsequent post will be hands-on demonstrating ROC/AUC using python and associated libraries. 

Let's set the baseline first: 

    1) Precision is True positive over Predicted positive 

    2) Recall is True positive over Actual positive (Recall is also referred as True positivity rate OR Sensitivity)



3) Let's introduce another team, Specificity

    Specificity is True Negative Rate(TNR): True negative over Actual negative

Sensitivity and Specificity are inversely proportional to each other 


False Positive Rate: Proportion of False positives over actual negatives. 
It can also be calculated as:  FPR =  1- Specificity 




For ROC we need a True-positive rate(TPR) and a False-negative rate(FPR).



Now let's observe visually different model performance(with threshold @0.5)

Perfect classification model:
    1. AUC is equal to 1, the model is able to classify all the data points correctly 
    2. There is no overlap in the probability distribution curves 



Not so perfect classification model:
    1. AUC is equal to 0.7, the model is able to classify ~70% of the data points correctly 

Clueless(my term πŸ™‚) classification model:
AUC= 0.5, this model cannot distinguish between the classes 

Opposite(my term πŸ™‚) classification model:
AUC= 0, the model is predicting an opposite 😁class or every datapoint



Good to know: 

    1. ROC/AUC can be applied to multiclass metrics

    2. Sensitivity and Specificity are inversely proportional to each other 

    3. Recall is the same as TPR(True positivity rate) or Sensitivity

    4. AUC = 1(Great model), AUC = 0(Model predicting opposite class)

Will follow up with a hands-on post to generate ROC/AUC curves, see you soon.

Have a great day!

References:

1. More about Precision and Recall in my earlier post

Comments

Popular posts from this blog

Confusion Matrix - Is "accuracy(metric)" flawed ?

R2 or Adjusted R2(Where is the adjustment ?)