Error:all arguments must have same length



I have a train dataset of dim(1060,76) and test dataset of dim(1059,76) .I am able to train the model and predict the values using test dataset.But when I am trying to create confusion matrix for the same it’s showing error " All arguments must have the same length".I am new to analytics.I guess it is due to difference in number of rows in train and test.Kindly help to resolve this issue.



Hi Darshika!

You might have an NA somewhere in your dataset, that is one cause for this error. Remove those and recreate the table.