make_perf_df | R Documentation |
Take a list of performance metrics and return the observed estimate and 95% confidence intervals based on 1000 bootstrap replicates in the form a data.frame.
make_perf_df(
preds,
obs,
metrics = list("brier", "sbrier", "ici", "lloss", "cstat"),
...
)
preds |
A vector of predicted probabilities for the first model. |
obs |
A vector containing the observed binary outcomes (0 or 1). |
metrics |
A list of names of functions as characters that are of the form f(preds, obs), e.g. "cstat" |
... |
Additional arguments for the particular metric or boot function, e.g. 'thresh = 0.6' |
# Generate some predictions for two different models
preds <- runif(1000)
# Generate some binary outcomes
obs <- sample(0:1, size = 1000, replace = TRUE)
# Calculate the Confidence interval around the estimate of the Brier Score
make_perf_df(preds, obs, metrics = list('brier', 'cstat'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.