How are thresholds determined for ROC-AUC calculation?
sobes.tech AI
Answer from AI
Thresholds for calculating ROC-AUC are the probability or model score cutoff values at which the classifier decides which class to assign to an object.
To construct the ROC curve, thresholds are chosen from the range of possible predicted probability values (usually from 0 to 1). At each threshold, the True Positive Rate (TPR) and False Positive Rate (FPR) are calculated.
Most often, thresholds are formed as unique predicted probability values on the test set, sorted in descending order. This allows evaluating the classification quality at different sensitivity and specificity levels.
An approximate algorithm:
- Obtain predicted probabilities for all objects.
- Sort unique probability values.
- Use each value as a threshold, classifying objects with probabilities above the threshold as positive.
- Calculate TPR and FPR for each threshold.
Based on these points, the ROC curve is plotted, and the area under it (AUC) serves as a measure of the model's quality.