2
$\begingroup$

I am interested to understand in which scenarios person should use sensitivity, specificity, and when should person opt for precision recall.

On a high level I understand for a balanced data set we should use precision, recall and if dataset is imbalanced we should use sensitivity and specificity. but I am not sure why they say it. If you people have different perspective, pls throw some light on how to perceive these.

$\endgroup$

2 Answers 2

6
$\begingroup$

On a high level I understand for a balanced data set we should use precision, recall and if dataset is imbalanced we should use sensitivity and specificity. but I am not sure why they say it.

Could you please give a reference where did you get this information? For imbalanced data sets, all the measures that you have mentioned can be used, but you should avoid reporting accuracy, since it can be very misleading.

As @Frank Harrell already mentioned in his answer, the logistic regression model models probability, but it can be used to make a binary classifier, by thresholding the probability.

All the measures you mentioned (sensitivity, specificity and precision, recall) can be used for evaluation of binary classifier performance. All these measures are based on 2×2 contingency table or confusion matrix, also known as an error matrix.

To decide what measures to use, you have to think about what cells in the confusion matrix are important to you. For example in information retrieval, true negatives can be usually ignored. But in medical diagnosis usage, true negatives are also very important and that is why specificity is used instead of precision. Also note that sensitivity = recall.

$\endgroup$
2
  • $\begingroup$ What's misleading about accuracy? $\endgroup$
    – Dave
    Commented Mar 14, 2022 at 15:03
  • $\begingroup$ Because it does not differentiate between the number of correctly classified examples of different classes. Therefore, it can lead to wrong conclusions. Specifically, say we have an unbalanced data set with very few positive examples. On this data set, the majority classifier, which assumes class 0 for all cases, can achieve very high accuracy, although it does not return any relevant results. On the other hand this is reflected in zero recall (sensitivity). $\endgroup$ Commented Mar 14, 2022 at 20:14
5
$\begingroup$

None of those measures are at all appropriate for logistic regression. The binary logistic regression model is a probability model. Its predictive performance should be judged by measures making full use of the model's estimated probabilities. For absolute accuracy, continuous calibration curves should be estimated (plot of actual probability vs. predicted probability with actual probability estimated in an independent test sample or using resampling). For predictive discrimination there are many measures, the simplest of which is to show a histogram of predicted probabilities with many bins, or a rug plot, and observing the width of this distribution. This article goes into several useful measures. A commonly used measure of pure predictive discrimination is the $c$-index or concordance probability, which happens to be the area of a receiver operating characteristic curve. This measures separation in predicted probabilities between observations with Y=0 and those with Y=1. $c$ is not a sensitive measure but is easy to interpret.

Sensitivity and specificity are only useful in a retrospective case-control study in which a single binary X is collected separately for those with Y=0 and those with Y=1. Sens and spec use reverse time conditioning so are usually not appropriate (they condition on the unknown to predict the known).

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.