I created a support vector machine for text classification. However, when I want to use it to predict new data, I get the following error message: Error in predict.svm(model, container@classification_matrix, prob = TRUE, : test data does not match model !
I could not figure out why I get this error.
The structure of the two containers look the following:
We don't know how you are using these data objects in code. Their dimensions are different but there is not enough to understand.
Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you!
If you've never heard of a reprex before, start by reading "What is a reprex", and follow the advice further down that page.