Gradient descent

Step 3 of 21 in Machine Learning · Build · Easy

Repeatedly step opposite the gradient of the loss. The learning rate controls step size: too small is slow, too large diverges. Stochastic GD uses mini-batches for speed.

Build it

  1. GD on a bowl

    Minimize f(x, y) = x² + 10y² with gradient descent at 4 learning rates; plot the paths on the contour plot.

    Done when: You show slow, good, zig-zag and divergent runs.

Resources

Earn this star

On the map, you log what you built. Finish the step and its star lights.

Open this step on the map