Logistic Regression 확률 문제를 선형회귀로 모델링 입력 : x = np.array([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]).reshape(-1, 1) y = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1]).reshape(-1, 1) model = LinearRegression() model.fit(x,y) y_hat = x*model.coef_ + model.intercept_ # 회귀선 plt.figure(figsize=(5,5)) plt.scatter(x, y, s=80) plt.plot(x, y_hat, color='r') plt.xlabel('Hour') plt.ylabel('Score') plt.show() 출력: =>..