Skip to content

Instantly share code, notes, and snippets.

@donquixotelamancha
donquixotelamancha / gradient_descent.py
Created July 14, 2018 02:52 — forked from ajmaradiaga/gradient_descent.py
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