We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I getting errors for these lines of codes:
from sklearn.linear_model import SGDClassifier y_train_5 = (y_train == 5) y_test_5 = (y_test == 5) sgd_clf = SGDClassifier(max_iter=5, tol=1e-3, random_state=42) sgd_clf.fit(X_train, y_train_5)
ValueError: The number of classes has to be greater than one; got 1 class
How can I solve this issue? Please guide me. Thank you so much.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I getting errors for these lines of codes:
from sklearn.linear_model import SGDClassifier
y_train_5 = (y_train == 5)
y_test_5 = (y_test == 5)
sgd_clf = SGDClassifier(max_iter=5, tol=1e-3, random_state=42)
sgd_clf.fit(X_train, y_train_5)
ValueError: The number of classes has to be greater than one; got 1 class
How can I solve this issue? Please guide me. Thank you so much.
The text was updated successfully, but these errors were encountered: