Hobbies And Interests
Home  >> Science & Nature >> Science

How to Calculate Accuracy From an ROC Curve

The relative operating characteristic curve, or ROC curve, is the ratio between true positives and false positives in a system. A system may detect a positive when the actual value is negative, which is a false-positive. A true-positive occurs when the actual value is positive and is detected as positive. The accuracy of the ROC curve is a measure of how well the system detects actual values, and it can be calculated by solving a simple equation.

Things You'll Need

  • ROC Curve
  • Rate of actual positives
  • Rate of actual negatives
Show More

Instructions

    • 1

      Find a point on the ROC curve that you wish to determine the accuracy of. The horizontal axis of the ROC curve shows the rate of true-positives in the detection system, and the vertical axis shows the rate of false-positives.

    • 2

      Familiarize yourself with the accuracy equation for ROC curves. This equation is the ratio of true-positives plus true-negatives to actual positives plus actual negatives. The equation looks like this, where TP is true-positive, TN is true-negative, P is actual positive, and N is actual negative. P + N is also equal to the total number of measurements taken by the system. If you don't have the exact values for P or N, you can fall back on total number of measurements and use it in place of (P + N).

      ACC = (TP + TN) / (P + N)

    • 3

      Add the number of true-positives to the number of true-negatives. For example, suppose the number of true-positives is 46 and true-negatives is 23. Adding these two together yields a value of 69.

    • 4

      Add the number of actual positives to the number of actual negatives. For example, suppose there were actually 50 positives and 30 negatives. Adding these together results in a value of 80.

    • 5

      Divide the sum of true-positives and true-negatives by the sum of actual positives and negatives. Continuing with the examples above, you would divide 69 by 80, resulting in an accuracy of 0.8625.

    • 6

      Analyze the accuracy value. The closer the accuracy is to 1.00, the more accurate the system is at predicting true-positives and true-negatives.


https://www.htfbw.com © Hobbies And Interests