I'm trying to use the Logistic Regression classifier and apply it on the UniGram bag-of-words feature set
The message is explicit: check the content of train_labels, it contains only class 1. Normally it should contain at least two different classes, otherwise there's nothing to classify.
so i am trying to use the Logistic Regression classifier and apply it on the UniGram bag-of-words feature set
my code:
clf = sklearn.linear_model.LogisticRegression()
clf.fit(tf_features_train, train_labels)
print (clf)
error message: This solver needs samples of at least 2 classes in the data, but the data contains only one class: 1
can someone please help me