I am working on a text classification problem and when I attempt to train my model with the data vectorized using TF-IDF it returns this error.
It is my understanding that this error appears when some of the labels were never predicted by the model. The error does not appear when I use CountVectorizer.
Do you have any suggestions on how to deal with this error?
Thank you
I know that you can get around this issue by passing np.unique(y_pred) as an argument for the metric score but thay would come with its own problems.