I'm a little confused by the predict function with a cv.glmnet object.
I'm running these two lines:
cvFit <- cv.glmnet(x = as.matrix(imputedTrainingData[,2:33]), y = imputedTrainingData[,1], family = "binomial", type.measure = "class" ) response<-predict(cvFit, as.matrix(imputedTestData[,2:33]), s= "lambda.min")
The y variable is a 2-level factor
Why is it that the predict statement gives a numeric vector and not the the class variable outcome predicted? I thought for a moment that perhaps it gives the probability or being in one class or another but the max value of results is just above .35 in my data and the min is -.42.