Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. sgd_clf = SGDClassifier()
  2. sgd_clf.fit(x_train, y_train)
  3.  
  4. >>> from sklearn.linear_model import SGDClassifier
  5. >>> X = [[0., 0.], [1., 1.]]
  6. >>> y = [0, 1]
  7. >>> clf = SGDClassifier(loss="hinge", penalty="l2")
  8. >>> clf.fit(X, y)
  9. SGDClassifier(alpha=0.0001, average=False, class_weight=None, epsilon=0.1,
  10. eta0=0.0, fit_intercept=True, l1_ratio=0.15,
  11. learning_rate='optimal', loss='hinge', n_iter=5, n_jobs=1,
  12. penalty='l2', power_t=0.5, random_state=None, shuffle=True,
  13. verbose=0, warm_start=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement