Skip to content

Instantly share code, notes, and snippets.

@chilang
Created May 25, 2020 16:57
Show Gist options
  • Save chilang/239514fcfe4ceb7a9c0a637a025a2db9 to your computer and use it in GitHub Desktop.
Save chilang/239514fcfe4ceb7a9c0a637a025a2db9 to your computer and use it in GitHub Desktop.
def fit(self, X, y):
if self.intercept_ is None or self.coef_ is None:
features = X.shape[1]
self.intercept_ = np.zeros(1)
self.coef_ = np.zeros((1, features))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment