Doubt in analogy of contour plots and mountain

The analogy goes like

Gradient descent is like when a user tries to find path to quickly descent from mountain.

Then contour plot also shown as per mountain analogy but the direction of minimum loss goes from outer to inner most circle.

The inner most circle is where we have peak of mountain, so how does this relates to mountain descent.

Is this countour plot of the convex hull function if yes, then it makes “some” sense to me

The first graph shows the current hypothesis or fitting of your model.

The second one you have plotted contours against weights. The center is the optima or the valley analogy.

A better analogy would be “how a drop of water finds the bottom of a bowl”.

1 Like

Yes, how Ng sir in the course giving example of mountains, its contour plot and stepping down as analogy of gradient descent was confusing.

Here the contour plot is of inverted mountain :sweat_smile: (bowl shaped cost function), which also becomes apparent as the curves are symmetrical (actual mountains are not that symmetrical).

Hi, tbhaxor

The color map of the contour defines the relative size of the value.
You can use colorbar() function to show the used colormap.