Skip to contents

Compute common weighted prediction metrics

Usage

ci_prediction_metrics(truth, estimate, weights = NULL)

Arguments

truth

Numeric or logical observed outcomes.

estimate

Numeric predicted probabilities or mean outcomes.

weights

Optional non-negative weights.

Value

A one-row data.table with Brier score, log loss, and ROC AUC.

Examples

ci_prediction_metrics(c(0, 1, 1), c(0.2, 0.6, 0.8))
#>    brier  log_loss roc_auc
#>    <num>     <num>   <num>
#> 1:  0.08 0.3190376       1