Created
May 6, 2018 09:30
-
-
Save jainanchit51/a2b89f3d3f2f36663e6dfa4177e6b0ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _gradient_descent(self,X, y, theta, alpha, iterations): | |
for i in (iterations): | |
theta = theta - (alpha/len(X)) * np.sum((X @ theta.T - y) * X, axis=0) | |
cost = self.cost_calculation(X, y, theta) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment