Posts

Showing posts from March, 2022

Confusion Matrix - "accuracy(metric)" flawed ?_post#2

Hello friends, this is my second post related to the confusion matrix measurement metric.  In my previous post , I explained how accuracy metrics may mislead judging the performance of a confusion matrix(an output from a classification model). We have also seen how Recall (True positive over Actual positive) metric in Example2 was able to catch the poor quality of positive class prediction.  We left the earlier post at this thought......      Does this mean we don't need precision?   The answer is No, let's see another example for the same use case Example3 : Consider the same class of 500 school students and you are trying to predict how many are affected because of covid and you can recommend them for isolation/quarantine.  This time you wanted to make sure there should not declare any student negative if he/she "may" be positive, you added some additional checks during testing, and the following was the result:     Actual   ...

ROC-AUC explained

Image
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) Perfe...