dx_fdr | R Documentation |
Calculates the False Discovery Rate (FDR), which is the proportion of false positives among all positive predictions. FDR is a critical measure in many classification contexts, particularly where the cost of a false positive is high.
dx_fdr(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
|
FDR is an important measure when the consequences of false discoveries (false positives) are significant. It helps in understanding the error rate among the positive predictions made by the classifier. A lower FDR indicates a better precision of the classifier in identifying only the true positives.
The formula for FDR is:
FDR = \frac{False Positives}{False Positives + True Positives}
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_fdr <- dx_fdr(cm, detail = "simple")
detailed_fdr <- dx_fdr(cm)
print(simple_fdr)
print(detailed_fdr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.