I want to get the AUC on the testing set from cv.glmnet for the best set of hyperparameters. according to this post.
I should run cvm
and get it, however, when I do this i get a value greater than 1, and my understanding is that the AUC should be between 0 and 1. Here's an example:
age <- c(4, 8, 7, 12, 6, 9, 10, 14, 7)
gender <- as.factor(c(1, 0, 1, 1, 1, 0, 1, 0, 0))
bmi_p <- c(0.86, 0.45, 0.99, 0.84, 0.85, 0.67, 0.91, 0.29, 0.88)
m_edu <- as.factor(c(0, 1, 1, 2, 2, 3, 2, 0, 1))
p_edu <- as.factor(c(0, 2, 2, 2, 2, 3, 2, 0, 0))
f_color <- as.factor(c("blue", "blue", "yellow", "red", "red", "yellow",
"yellow", "red", "yellow"))
asthma <- c(1, 1, 0, 1, 0, 0, 0, 1, 1)
xfactors <- model.matrix(asthma ~ gender + m_edu + p_edu + f_color)[, -1]
x <- as.matrix(data.frame(age, bmi_p, xfactors))
cv.glmmod <- cv.glmnet(x, y=asthma, alpha=1,family="binomial", type.measure = "auc")
max(cv.glmmod$cvm)
[1] 7.0223
How do I interpret this number? is it really just .70223?
Thanks, Steve