<분류> Stochastic Gradient Descent (SGD)
Data Analyticsㅤ/ㅤMachine Learningㅤ

<분류> Stochastic Gradient Descent (SGD)

확률적 경사 하강법 분류기

- Loss가 최저점(global cost minimum)인 곳이 optimum이다.

 

Step

- Step 0 : 모델 import

from sklearn.linear_model import SGDClassifier

- Step 1 : 모델 선언

sgd = SGDClassifier()

- Step 2 : 모델 학습

sgd.fit(x_train, y_train)

- Step 3 : 예측

sgd_pred = sgd.predict(x_valid)

- Step 4: 평가

(sgd_pred == y_valid).mean()