I am trying to plot a ROC curve for my glmnet
regression model. In order to do that, I am trying to predict using type = "response" in predict function:
pred_glmnet_s10_2class <- predict(model_train_glmnet_s10_2class,
newdata=testing_s10_2class,
s = "model_train_glmnet_s10_2class$finalModel$lambdaOpt",
type="response")
and I get the following error:
Error in predict.train(model_train_glmnet_s10_2class, newdata = testing_s10_2class, : type must be either "raw" or "prob"
My predictions and class labels are binary 0 and 1 and have been factored. Any help is really appreciated. Also, any ideas on how to plot AUC (Area Under ROC curve) vs number of features? Thanks!