Chapter 3 (Page 82): Getting error during Fitting the SGD Classifier with Training data
未關閉
- 主要語言
- Jupyter Notebook
- 星號
- 25.6k
- 分支
- 12.7k
- PR 合併指標
- PR 指標待擷取
描述
**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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。