Gradient Descent

We have a function we want to minimize (the cost function).

Algorithm:

  • Start with some start parameter
  • Change parameter to reduce the function value until we hopefully end up at a minimum

Basically go down a hill

Gradient Descent Visualization

Repeat until convergence

θj:=θj−α∂∂θjJ(θ0,θ1)\theta_j := \theta_j - \alpha \frac{\partial}{\partial\theta_j}J(\theta_0, \theta_1)

  • α\alpha is learning rate

The need to update simultaneously:

new_theta_0 = calc_new_theta_0(theta_0, theta_1)
new_theta_1 = calc_new_theta_1(theta_0, theta_1)
theta_0 = new_theta_0
theta_1 = new_theta_1