Skip to content

Instantly share code, notes, and snippets.

View ssingh1187's full-sized avatar
🎯
Focusing

Shilpa Singh ssingh1187

🎯
Focusing
View GitHub Profile

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ssingh1187
ssingh1187 / gradient_descent.py
Created February 28, 2019 19:02 — forked from colejhudson/gradient_descent.py
Gradient descent implemented from scratch over R^N to R^M
import numpy as np
import collections
# These functions have been designed with numpy in mind. To
# that end they take arrays as inputs and provide arrays as output
def derivative(f):
def df(x, h=0.1e-10):
return np.array((f(x+h)-f(x-h))/(2*h))
return df