Skip to content

Instantly share code, notes, and snippets.

View atsukoba's full-sized avatar
😀
I am the walrus

Atsuya Kobayashi atsukoba

😀
I am the walrus
View GitHub Profile
@atsukoba
atsukoba / 1-dim steepest descent.py
Created January 25, 2018 15:27 — forked from matsuken92/1-dim steepest descent.py
Various types of gradient descent method
import numpy as np
import matplotlib.pyplot as plt
from moviepy.editor import *
from matplotlib import animation as ani
sigma = 1
mu = 3
def norm_dist_neg(x):
return -1./(np.sqrt(2 * np.pi) * sigma)* np.exp(-0.5*((x-mu)**2)/((sigma**2)))