ROC and PR: Same identifier, why accuracy changes with base rate
Calculate accuracy and recall by mixed count to explain the different baselines of PR and ROC in rare events.
Learning objectives and first steps2 objectives . 1 first fix
Try to do it after reading
- Calculating accuracy and recall by confused count
- Explains different baselines for PR and ROC in rare events
Suggested first
- Classification and probabilities projections
A small number of misreportings could have caused a lot of misreporting
ROC uses real incidence and leave rate, PR uses accuracy and recall. The former are assimilated in the positive and negative categories, respectively, while the latter have the precision to place both types of quantities in the same denominator. In rare incidents, the number of negative categories is high, so that a seemingly low rate of leave is still likely to lead to significant misreporting.
The same point of operation for the two groups
One thousand composite samples, 100 positive and 9900 negative. If the real rate of 0.8, the rate of 0.01, is true, the true rate of 80, the actual rate of 99, with an accuracy of 80/179, about 0.44693, is recalled at 0.8. For a positive case of 1,000 and negative cases of 9,000, the conditions remain the same for both categories, the true rule of 800, the rule of 90, the accuracy of 800/890, or about 0.89888. The two ROC operations are identical, while the PR accuracy is significantly different. The reason is that the benchmark rate has changed from 0.01 to 0.1, rather than that the model suddenly learned the new rules of distinction. This comparison can be made only if the distribution of the sub-species remains stable accordingly; Real population changes may also change identification capabilities simultaneously.
Curves and baselines
The randomly sorted PR baseline is related to the regular scale, and the random base guideline for ROC follows the diagonal line. Thus, the area of PR for different data sets cannot be directly compared with the event rate. The curve area also relies on a plug value or average precision definition, with specific indicators to be specified, rather than the values of the area in all names being considered the same calculation.
There's still a cost to the action level
The same recall, where the number of misreporteds affects the audit capacity and user costs; At the same level of accuracy, the number of positive cases missing depends on the coverage. The threshold selection should be combined with the resource, cost and certification agreement and should not be the best to accept the 0.5 threshold because of the high size of a ROC area.
Data and statistical boundaries
If the test set is to increase the normal rate for ease of labelling, the accuracy of the direct calculation may not represent the line, and the target population or the reporting condition rate will need to be restored. For a small number of positive cases, the curves and areas fluctuate widely and the number of events, time windows and uncertainties should be retained. The definition of the category must also be fixed. (b) When fraud, click or default is predicted, the opposite direction is exchanged for some of the indicators; Unmatched labels and selective verifications may also change confusion counts. It would be more useful to write down the denominators and the crowds first than to pick just one more beautiful curve.
Self-measurement and provocator
Why less than half the accuracy of the first group of people, with a regular rate of one per cent?
Because 99 of the 9,900 negative cases remain falsely reported, more than 80 real cases, with an accuracy of 80/179.
Does accuracy remain constant when the proportion of cases is changed?
Usually not. Even if the class conditions TPR and FPR remain unchanged, the accuracy changes with the target baseline rate.
Sources and reconciliations
Definitions, methods and interfaces are available.
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.