The ROC curve (Receiver Operating Characteristic) is a plot showing the behaviour of a binary classifier across all possible decision thresholds. The horizontal axis carries the false positive rate, the vertical axis the true positive rate, that is, recall. The curve is traced by gradually lowering the threshold from the strictest to the most lenient, so its shape describes the entire trade-off between catching positive cases and the frequency of false alarms. The summary metric is the area under the curve, AUC: a value of 0.5 corresponds to random guessing, a value of 1.0 to perfect separation. An elegant interpretation of AUC says it is the probability that a randomly chosen positive sample receives a higher score than a randomly chosen negative one; the metric is thus independent of both the threshold and the class ratio. That last property, however, is a trap: on heavily imbalanced data AUC looks excellent even when the model is useless in practice, because the enormous number of negative cases dilutes the false alarms. In such cases the precision-recall curve and the area under it are what tell you something.
Imagine ranking all patients by how suspicious the model finds them, from most to least. AUC answers a simple question: if I take one genuinely ill person and one healthy one, what is the chance the ill one stands higher in the queue? Ninety per cent is a good result; fifty means the model orders people as if flipping a coin. But beware the situation where one person in ten thousand is ill. The queue may look excellent and yet the first hundred places will hold ninety-nine healthy people – and for running a clinic that is the only thing that matters.