ML Katas

Tracing Gradient Descent on a Parabola

easy (<30 mins) Gradient Descent Optimization Calculus
this year by E

Imagine a simple 1D function f(x)=x24x+5. Your goal is to find the minimum of this function using Gradient Descent.

  1. Derive the gradient: What is dfdx?
  2. Perform a few steps: Starting at x0=0, and using a learning rate α=0.1, calculate the next three steps (x1,x2,x3).
  3. Intuition: Describe in your own words what is happening at each step. How does the magnitude of the gradient influence the step size?
  4. Verification: You can plot the function and mark the points you calculated. Also, find the analytical minimum of the function and compare it to your result after a few steps. Does it converge towards the minimum?