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


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.

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