Basic Steps for Using Gradient Descent (Step 0 and 1)

Learn about the first two steps for using gradient descent.

Step 0 - Random initialization

In our example, we already know the true values of the parameters, but this will obviously never happen in real life. If we knew the true values, why even bother to train a model to find them?

Given that we will never know the true values of the parameters, we need to set initial values for them. However, how do we choose them?

It turns out, a random guess is as good as any other. For training a model, you need to randomly initialize the parameters/weights. In our case, we only have two: b and w.

This can be observed in the code given below:

Get hands-on with 1400+ tech skills courses.