logo-MindMajix

Questions By

How To Fix Error In Confusion Matrix: The Data And Reference Factors Must Have The Same Number Of Levels?

Hello, While I’m working on R caret Linear Regression model. I’m trying to execute a confusion matrix and then I’m getting this below:

Error in confusionMatrix.default(pred, testing$Final): the data and reference factors must have the same number of levels.

Can anyone tell me What does it mean, Why this error occurs, and How to fix this error?

 

J
Justus Blake

Posted on 29th June 2020 | 371 views

1votes
0answers
STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number