Gradient Descent and Numerical Optimization › Advantages

Michael BrenndoerferOctober 25, 20262 min read
Machine Learning from ScratchAll chapters
Part 3 of 15Model Fundamentals and Diagnostics
Chapter 30Gradient Descent and Numerical Optimization › Advantages
Reading section 2 of 10 · Advantages · 2 minSection 2 of 10 · 2 min

Section 2 of 10 · 2 min read

Gradient Descent and Numerical Optimization › AdvantagesSection view · Sections in this chapter2 / 10 ↓
Reading tools Definitions, links & notes

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Notes & comments

The update needs an objective and its gradient rather than a closed-form minimizer. We can therefore use it for smooth fitting problems such as logistic regression, using negative log-likelihood as the objective. For an unconstrained problem, the same update structure applies when we change the loss and compute its new gradient. Nondifferentiable objectives require an appropriate alternative, such as a subgradient or proximal method.

For the dense linear model used here, a full gradient costs O(np)O(np) operations for nn rows and pp parameters. A single-example or mini-batch update can use less data before changing the parameters. These first-order updates avoid forming a p×pp\times p Hessian, and data can be supplied in batches when storing the full design is inconvenient.

An iterative fit also produces a history that we can inspect. We can record the objective, gradient norm, parameter changes, and stopping reason. Computing these diagnostics has a cost, and an increasing objective can be expected during stochastic updates, so the appropriate interpretation depends on the algorithm.

Smooth penalties can be included in the objective and differentiated along with the data-fit term. Constraints need additional treatment, such as a projection or a solver designed for the feasible set; an unconstrained gradient step alone does not enforce them.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy