I have made a prediction using a model on testing data:
EN1.model.cv.best <- EN1.model.cv$finalModel
#make prediction on test data
EN1.model.prediction <- predict(EN1.model.cv.best, newx = as.matrix(test.data.1[ ,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?