typo in week39
This commit is contained in:
@@ -553,7 +553,7 @@ y = 4+3*x+np.random.randn(100,1)
|
||||
xb = np.c_[np.ones((100,1)), x]
|
||||
beta_linreg = np.linalg.inv(xb.T.dot(xb)).dot(xb.T).dot(y)
|
||||
print(beta_linreg)
|
||||
sgdreg = SGDRegressor(n_iter = 50, penalty=None, eta0=0.1)
|
||||
sgdreg = SGDRegressor(max_iter = 50, penalty=None, eta0=0.1)
|
||||
sgdreg.fit(x,y.ravel())
|
||||
print(sgdreg.intercept_, sgdreg.coef_)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user