You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When run crf.fit(X_train, y_train) during the text classification task, pop up "TypeError: 'int' object is not iterable". X_train is the float array(Tfidf), y_train (series) is corresponding labels.
y_train should include label for each word and not only for each sentence, so it should be series of lists of labels.
for example for the sentence "how are you", y_train should be a series that include one list [0,0,1] (random values, but the length should be 3, one label for each word)
When run crf.fit(X_train, y_train) during the text classification task, pop up "TypeError: 'int' object is not iterable". X_train is the float array(Tfidf), y_train (series) is corresponding labels.
https://stackoverflow.com/questions/56285456/typeerror-numpy-int32-object-is-not-iterable-error-while-using-sklearn-crfs
The text was updated successfully, but these errors were encountered: