fpr | R Documentation |
Calculates the False Positive Rate (FPR), which is the proportion of actual negatives that were incorrectly identified as positives by the classifier. FPR is also known as the fall-out rate and is crucial in evaluating the specificity of a classifier.
dx_fpr(cm, detail = "full", ...)
dx_fall_out(cm, detail = "full", ...)
cm |
A dx_cm object created by |
detail |
Character specifying the level of detail in the output: "simple" for raw estimate, "full" for detailed estimate including 95% confidence intervals. |
... |
Additional arguments to pass to metric_binomial function, such as
|
FPR is particularly important in contexts where false alarms are costly. It is used alongside True Negative Rate (specificity) to understand the classifier's ability to correctly identify negative instances. A lower FPR indicates a classifier that is better at correctly identifying negatives and not alarming false positives.
The formula for FPR is:
FPR = \frac{False Positives}{False Positives + True Negatives}
Depending on the detail
parameter, returns a numeric value
representing the calculated metric or a data frame/tibble with
detailed diagnostics including confidence intervals and possibly other
metrics relevant to understanding the metric.
dx_cm()
to understand how to create and interact with a
'dx_cm' object.
cm <- dx_cm(dx_heart_failure$predicted, dx_heart_failure$truth,
threshold =
0.5, poslabel = 1
)
simple_fpr <- dx_fpr(cm, detail = "simple")
detailed_fpr <- dx_fpr(cm)
print(simple_fpr)
print(detailed_fpr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.