Gradient Descent and Numerical Optimization › Advantages
Machine Learning from ScratchAll chapters 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
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 operations for rows and parameters. A single-example or mini-batch update can use less data before changing the parameters. These first-order updates avoid forming a 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!