I\'m trying to predict the class of a test array, but I\'m getting the below error, along with the stack trace:
Traceback (most recent call last): File \"/
The variable test is a string - the SVC needs a feature vector with the same number of dimensions as X. You have to transform the test string to a feature vector using the same vectorizer instance, before you feed it to the SVC:
X_test=tvect.transform(test) classifier.predict(X_test)