d <- rbind(
data.frame(x = rbeta(1000, shape1 = 6, shape2 = 4), y = TRUE),
data.frame(x = rbeta(1000, shape1 = 2, shape2 = 3), y = FALSE)
)
find_matching_conditional_betas(modelPredictions = d$x, yValues = d$y)
# should be near
# shape1_pos shape2_pos shape1_neg shape2_neg
# 6 4 2 3
#
# # How to land all as variables
# unpack[shape1_pos, shape2_pos, shape1_neg, shape2_neg] <-
# find_ROC_matching_ab(modelPredictions = d$x, yValues = d$y)
Run the code above in your browser using DataLab