Skip to content

Instantly share code, notes, and snippets.

@tfolkman
Last active November 11, 2019 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfolkman/82bc8d77e3459fae456b9ed978f839ce to your computer and use it in GitHub Desktop.
Save tfolkman/82bc8d77e3459fae456b9ed978f839ce to your computer and use it in GitHub Desktop.
sgd
from sklearn.linear_model import SGDRegressor
linear_regression_model = SGDRegressor(tol=.0001, eta0=.01)
coeffs = []
for i, data in enumerate(bootstrap_X):
linear_regression_model.fit(data, bootstrap_y[i])
coeffs.append(linear_regression_model.coef_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment