Using predict() for binary classification model and next steps? Elastic net logistic regression

I have made a prediction using a model on testing data: <-$finalModel

#make prediction on test data

EN1.model.prediction <- predict(, newx = as.matrix([ ,2:10]), type = "class")

I am unsure which is the 'type' to use (class or response). I understand 'response' provides numerical values and 'class' returns the labels. I have 9 predictor variables and one response variable with two levels (labelled as two vs three). I'm hoping to create a confusion matrix to analyse the true and false positive values. Can anyone help me with this?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.