Skip to content

Instantly share code, notes, and snippets.

@phil8192
Created April 3, 2020 20:58
Show Gist options
  • Save phil8192/c3d692869087206ad531702d0d6d26ff to your computer and use it in GitHub Desktop.
Save phil8192/c3d692869087206ad531702d0d6d26ff to your computer and use it in GitHub Desktop.
def taylor_gradient(theta, x, y):
return 1/x.shape[0] * np.dot(0.25 * np.dot(x, theta) - 0.5 * y, x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment