4
$\begingroup$

It has been decades since I coded up any type of gradient descent algorithm to drive a function to zero (or to a minimum). I am following this tutorial, which minimizes $J(\overrightarrow{\theta})$. It all seems straighforward except for one thing. The step size along any dimension $i$ is proportional to the gradient $\partial J / \partial \theta_i$.

Doesn't a steeper gradient along dimension $i$ mean you should take smaller step sizes because $J$ changes rapidly with $\theta_i$?

$\endgroup$
3
$\begingroup$

You want to head "downhill" -- in the direction in which the slope is decreasing most quickly. Considered in terms of the axes, the relative speeds of decrease will each be proportional to that derivative.

Which is to say, no the book is right.

How far you step in that direction is a slightly different matter.

[However, if the minimum is nearly quadratic, you actually do want to have an absolute step size that is proportional to the derivative (since the steeper the slope, the further you are from the minimum, other things being equal). However, this consideration is not usually applied with gradient descent.]

$\endgroup$
  • $\begingroup$ That makes perfect sense. Thank you. $\endgroup$ – user2153235 Dec 2 '19 at 3:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.