Spire by Example
summary
Implements gradient descent using Spire vector-space and random Dist to approximate gradients by fitting linear least squares to sampled site-traffic outcomes, runs a 60-run simulation, and compares sampling strategies: fixed 1‑day (fast but high error), fixed 7‑day (very low error but impractically slow), ramp-up and jump strategies (faster but biased). Claims the code is working end‑to‑end in Scala, shows the tradeoff between convergence speed and estimation error.
AI-written summary · about
chapters (20)
- 0:00Start
- 1:09The Problem
- 2:44Requirements for Optimizing F
- 3:58What Spire Gave Us
- 4:26Why Does It Work?
- 4:43Algebras Used In This Talk
- 6:16VectorSpace[V,A]
- 6:57Back to the Example
- 7:16Making it Generic
- 7:30The Optimization Loop
- 8:47Testing it Out: Linear Least Squares
- 9:11Gradient Descent Requirements
- 13:03Approximate the Gradient
- 15:11So... What's the "timespan" Thing?
- 16:29Test It Out!
- 17:07Ramp-up X
- 17:45Strategy 3: Jump Up
- 18:08Other Methods on Seq and Array
- 18:31A Week in Code
- 19:15Results: No Free Lunch
related talks
01h 07mOptimization Crash Course (continued)
33mTradeoffs in Large Scale Learning: Statistical Accuracy vs. Numerical Precision
19mGradInf: Gradient Estimation as Probabilistic Inference
01h 18mOptimization I
01h 02mSampling for Linear Algebra, Statistics, and Optimization II
01h 59mSpiking Neural Networks
37mThe solution of inverse problems
46mGradient Descent: The Ultimate Optimizer
