sensitivity | R Documentation |
Calculates Sensitivity, also known as the True Positive Rate (TPR) or recall, which is the proportion of actual positives that are correctly identified as such by the classifier. Sensitivity is a key measure in evaluating the effectiveness of a classifier in identifying positive instances.
dx_sensitivity(cm, detail = "full", ...)
dx_recall(cm, detail = "full", ...)
dx_tpr(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
|
Sensitivity or TPR is an important measure in scenarios where missing a positive identification has serious consequences. It essentially measures the proportion of actual positives that are correctly identified, giving insight into the ability of the classifier to detect positive instances. A higher sensitivity indicates a better performance in recognizing positive instances.
The formula for Sensitivity is:
Sensitivity = \frac{True Positives}{True Positives + False 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_sensitivity <- dx_sensitivity(cm, detail = "simple")
detailed_sensitivity <- dx_sensitivity(cm)
print(simple_sensitivity)
print(detailed_sensitivity)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.