I have the following dataframe with data:

```
index   field1      field2            field3
1079    COMPUTER    long text....     3

```

Field1 is a category and field2 is a description and field3 is just an integer representation of field1.

I am using the following code to learn field2 to category mappings with sklearn:

```
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.naive_bayes import MultinomialNB

X_train, X_test, y_train, y_test = train_test_split(df['Text'], df['category_id'], random_state = 0)
count_vect = CountVectorizer()
X_train_counts = count_vect.fit_transform(X_train)
tfidf_transformer = TfidfTransformer()
X_train_tfidf = tfidf_transformer.fit_transform(X_train_counts)
clf = MultinomialNB().fit(X_train_tfidf, y_train)

```

After I trained the model I can use it to predict a category and it works well. However, I would like to evaluate the model using the test set.

```
X_test_counts = count_vect.fit_transform(X_test)
X_test_tfidf = tfidf_transformer.fit_transform(X_test_counts)
clf.score(X_test_tfidf, y_test) 

```

It throws the following error:

```
ValueError: dimension mismatch

```

Is there a way test the model and get the score or accuracy with such dataset?

UPDATE: Adding similar transformation to the test set.