This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Optimization

Quasi-Newton methods

demoAIOptimizationwritten with an agent#e075db35de

BFGS against gradient descent on the Rosenbrock valley

Both methods start at on Rosenbrock's function and use the same backtracking line search; they differ only in the direction they search along. BFGS is within of the minimum at after 35 iterations and has a zero gradient to after 36. Gradient descent takes 22,962 iterations to get within , and near the minimum it gains a factor of only 0.99919 per step, close to for the Hessian's condition number .

Paths from (-1.2, 1) to the minimum at (1, 1)-0.500.511.52-1.5-1-0.500.511.5xy
valley floor y=x2f = 1f = 5f = 24.2gradient descentBFGS
Distance to the minimum10⁻¹⁵10⁻¹⁰10⁻⁵10⁰10⁰10¹10²10³10⁴iteration + 1|x - (1, 1)|
gradient descentBFGS
✓ 9 tests passchecked when the site was built#optimization#bfgs#quasi-newton#gradient-descent#line-search#notebook
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.