fnr | R Documentation |
Calculates the False Negative Rate (FNR), which is the proportion of actual positives that were incorrectly identified as negatives by the classifier. FNR is also known as the miss rate and is a critical measure in evaluating the performance of a classifier, especially in scenarios where failing to detect positives is costly.
dx_fnr(cm, detail = "full", ...)
dx_miss_rate(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
|
FNR is an important measure in situations where the cost of missing a positive classification is high. It complements the True Positive Rate (sensitivity) and helps in understanding the trade-offs between identifying positives and avoiding false alarms. A lower FNR is generally desirable and indicates a more sensitive classifier.
The formula for FNR is:
FNR = \frac{False Negatives}{False Negatives + 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_fnr <- dx_fnr(cm, detail = "simple")
detailed_fnr <- dx_fnr(cm)
print(simple_fnr)
print(detailed_fnr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.