How to view the confusion matrix having data counts using caret in R

r
confusion_matrix
caret

#1

Hello,

I am using caret for training models but when I try to see the confusion matrix:

What to do so that I can see the counts as is normally shown in confusion matrix.
r


#2

Hello @pagal_guy,

using caret you can write this

confusionMatrix(testPred, testing$Class)

or without using caret

table(testPred, testing$Class)

Hope this helps,
Nilesh Borade