Build a tool that animates gradient descent on functions you choose — a bowl, a long narrow valley, a function with two minima — so you can see how the learning rate, the starting point and the shape of the function change the path.
Project idea · ungraded
Gradient-Descent Visualiser
You will use
Milestones
Build the smallest working version first. Ticks are saved in this browser only.
Stretch goals
- Add momentum and compare its path in a narrow valley.
- Animate the path with matplotlib's animation module and save a GIF.
- Let the user type a formula and parse it safely.
Data
No data: the functions are your own. See matplotlib's animation guide.
Run it yourself
pip install numpy matplotlib
python descent.py