Derivatives and Gradients: The Direction of Steepest Change
If linear algebra is the language of data, calculus is the language of change and optimization — and here is the reassuring truth to carry into it: you need far less calculus for …
Calculus and Optimization covers: Derivatives and Gradients, The Chain Rule and Backpropagation, Optimization, Gradient Descent, Beyond Vanilla. Year 4, Quarter 13. Includes 12 exercises and 2 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
If linear algebra is the language of data, calculus is the language of change and optimization — and here is the reassuring truth to carry into it: you need far less calculus for …
The last lesson said learning means following the negative gradient downhill — but it left a giant question unanswered: how do you actually compute the gradient of a model with mi…
The previous lessons gave you the gradient (the downhill direction) and backpropagation (how to compute it). This lesson zooms out to the terrain itself: the loss landscape you're…
This is the lesson where everything converges into the single algorithm that trains essentially every machine-learning model in existence: gradient descent. You now have all the p…
The last lesson gave you gradient descent — the workhorse — but real optimization has three more dimensions the practitioner must understand, and this closing lesson covers them. …
- [ ] Compute partial derivatives of f(x,y) = x^2y + sin(xy) — Multivariable calculus basics - [ ] Compute the gradient of f(x,y) = x^2 + 2y^2 - 4x + 6y — Find the minimum analyti…
- [ ] Implement gradient descent for linear regression in Python — From scratch, no sklearn - [ ] Implement Newton's method for optimization in Python — Compare convergence speed …
- [ ] Implement automatic differentiation (forward mode) in Python — Dual numbers, operator overloading - [ ] Solve constrained optimization using Lagrange multipliers — Maximize …
- [ ] Build a mini-autograd engine in Python — Implement computation graph, forward pass, backward pass (chain rule), support +, , pow, relu, sigmoid; train a 2-layer MLP on synth…
Implement gradient descent (batch, stochastic, mini-batch) for 2D functions in Python. Visualize the optimization path as a contour plot with matplotlib. Compare learning rates (t…
Fit a polynomial to noisy data using gradient descent. Implement the loss function (MSE), gradient computation (analytical), and optimization loop from scratch. Show underfitting …
- [ ] What is a gradient? What does it represent geometrically? - [ ] Explain the chain rule. Why is it essential for backpropagation? - [ ] What is gradient descent? Explain the …
12 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.