estimate_diagnostic | R Documentation |
This function defines the calculations of common model diagnostics which are available.
estimate_diagnostic(data, label, prediction, diag_name, params)
data |
The full data frame with all auxilliary columns. |
label |
The (string) column name for the labels to evaluate against. |
prediction |
The (string) column name of predictions from the model to diagnose. |
diag_name |
The (string) name of the diagnostic to calculate. Currently available are "AUC", "MSE", "SL_coefs", "SL_risk", "RROC" |
params |
Any other necessary options to pass to the given diagnostic. |
df <- dplyr::tibble(y = rbinom(100, 1, 0.5), p = rep(0.5, 100), w = rexp(100), u = 1:100)
attr(df, "weights") <- "w"
attr(df, "identifier") <- "u"
estimate_diagnostic(df, "y", "p", "AUC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.