Artificial intelligence · lesson 2 of 4
Gradient descent and learning-rate choices
Gradient descent uses θnew=θ−η∇L(θ) with a positive step size η. The negative gradient is locally downhill for a differentiable objective.
Learn the ideas
Prerequisites: Derivatives and vector arithmetic.
Update
Gradient descent uses θnew=θ−η∇L(θ) with a positive step size η. The negative gradient is locally downhill for a differentiable objective.
Learning rate
A step that is too large can overshoot or diverge. A very small step can be slow; no one value is suitable for every objective.
Batches
Full-batch and minibatch methods use different gradient estimates. Stochastic variation can affect the optimization trajectory.
Checking
A finite-difference check can help detect derivative implementation errors on small examples. It is a numerical diagnostic with step-size limitations.
Worked examples
For θ=4, gradient 6 and η=0.1, find the next gradient-descent parameter.
4−0.1×6=3.4.
3.4
For L(w)=(w−2)², find the gradient at w=5.
2(w−2)=6.
6
Check your understanding
8 questionsDecimals or fractions are accepted for numeric answers. Proofs and written responses use sample answers and require human marking. This is practice, not a protected examination.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.