Simulate and compare convergence rates
CodingIntermediate⏱ 1 hourAdvanced Optimizationsimulationmomentumnesterovrates
Problem
Implement gradient descent, heavy ball, Nesterov and conjugate gradient on a quadratic with controllable .
- Verify each method's predicted rate by fitting the slope of .
- Confirm that the advantage of momentum grows as versus .
- Show heavy ball diverging when is set too large, and identify the threshold.
Implement it, then check the implementation against something you can verify independently.
Write it
Solve it here8 tests · Python runs in your browser
⌘/Ctrl + ↵ to run · limit 90s · draft saved in this browser
8 tests will run against your code. The first run downloads the Python runtime — several megabytes, once per browser.
Solution
Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.
Related problems
All problems| Solved | Problem | Field | Type | Difficulty | Time |
|---|---|---|---|---|---|
| Simulate distance contrast run | Classical ML | Coding | 30 min | ||
| Balls into bins, with one choice and with two run | AI Systems | Coding | 1 hour | ||
| Cache hit rates under Zipf popularity run | AI Systems | Coding | 1 hour | ||
| Measure anisotropy in an embedding space run | RAG | Coding | 1 hour | ||
| Measure fan-out amplification and the value of hedging run | AI Systems | Coding | 1 hour |