Query Data Dimension Must Match Training Data Dimension
I'm developing a tweet classifier. I trained a knn clasiffier with a a tfidf dataset in which each row has a length of 3.173, after training the model a load it into a file so that
Solution 1:
The solution is simple:
You need to use vect.fit_transform()
with the training data. But, when using the test data, you need only to use vect.transform()
.
Post a Comment for "Query Data Dimension Must Match Training Data Dimension"