ml

Gradient Descent

Step-by-step GD on 1D polynomials — vanilla, momentum, Nesterov; animated path with prev/next/play controls, divergence & oscillation detection.

Function
Algorithm
Parameters
1 / 60
f(x) — gradient descent path
● start● current—— f(x)
Current Step
Step1
x5
f(x)10
∇f(x)6
Steps run60
Final x2
Final f(x)1
|∇f| at final0.0000115
Step History
#xf(x)∇f
15106
Vanilla: x ← x − η∇f  ·  Momentum: v ← βv + η∇f, x ← x − v
Nesterov: look-ahead g ← ∇f(x − βv), then v ← βv + ηg, x ← x − v