| binary_metrics | R Documentation |
Calculation of fit metrices for binary variables (Sensitivity, specificity, accuracy)
binary_metrics(
observed,
expected,
no_information_rate = "negative"
)
observed |
Numeric vector: Y observed |
expected |
Numeric vector: Y expected |
no_information_rate |
|
The function computes model performance metrices for binary outcomes. Observed and expected data must be stated by the user. The function returns sensitivity, specificity, accurracy, and no-information rate.
list with two entries:
fit_metrics: |
|
observed_expected: |
|
Thomas Wieland
Altman DG, Bland JM (1994) Diagnostic tests. 1: Sensitivity and specificity. British Medical Journal 308, 1552. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1136/bmj.308.6943.1552")}.
Boehmke B, Greenwell B (2020) Hands-On Machine Learning with R (1 ed.). Taylor & Francis, New York, NY.
metrics, binary_metrics_glm
obs <- c(1,1,0,0,0,0,1,0,1)
exp <- c(0,1,0,0,0,0,1,0,0)
binary_metrics(
obs,
exp
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.