confusion matrix

rstudio
#1

Hello I'm getting this error while I'm triying to get the confusion matrix after a prediction.

mc = table(test$barbecue , pred0)
Error in table(test$barbecue, pred0) : 
  all arguments must have the same length

I've tried to fixe it via some solution available but it does not work.

0 Likes

#2

Take a look at this:

table(sample(0:1, 9, replace = TRUE), sample(0:1, 10, replace = TRUE))
Error in table(sample(0:1, 9, replace = TRUE), sample(0:1, 10, replace = TRUE)) : 
  all arguments must have the same length

versus

table(sample(0:1, 10, replace = TRUE), sample(0:1, 10, replace = TRUE))
   
    0 1
  0 2 4
  1 3 1
0 Likes

closed #4

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.

0 Likes