I\'ve trained a tree model with R caret. I\'m now trying to generate a confusion matrix and keep getting the following error:
Error in confusionMatrix
Maybe your model is not predicting a certain factor. Use the table() function instead of confusionMatrix() to see if that is the problem.
table()
confusionMatrix()