Skip to content

Instantly share code, notes, and snippets.

View rulisastra's full-sized avatar
🐞
let's play! Keep the fire and ideas ALIVE 🔥🔥

rulisastra rulisastra

🐞
let's play! Keep the fire and ideas ALIVE 🔥🔥
View GitHub Profile
@ajmaradiaga
ajmaradiaga / gradient_descent.py
Created March 30, 2017 09:29
Gradient Descent implemented in Python using numpy
import numpy as np
def gradient_descent_runner(points, starting_m, starting_b, learning_rate, num_iterations):
m = starting_m
b = starting_b
for i in range(num_iterations):
m, b = step_gradient(m, b, np.array(points), learning_rate)
return m, b