# Two class
data("two_class_example")
brier_class(two_class_example, truth, Class1)
# Multiclass
library(dplyr)
data(hpc_cv)
# You can use the col1:colN tidyselect syntax
hpc_cv %>%
filter(Resample == "Fold01") %>%
brier_class(obs, VF:L)
# Groups are respected
hpc_cv %>%
group_by(Resample) %>%
brier_class(obs, VF:L)
Run the code above in your browser using DataLab