Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jainanchit51/b9d4885969a32176384729dd46a99987 to your computer and use it in GitHub Desktop.
Save jainanchit51/b9d4885969a32176384729dd46a99987 to your computer and use it in GitHub Desktop.
def train(self,learning_rate,iter):
alpha = learning_rate
iterations = range(0,iter)
# here x is columns
X = self.x_input
ones = np.ones([X.shape[0],1])
X = np.concatenate((ones,X),axis=1)
y = self.y_input.values
theta = np.zeros([1,3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment