April 2019
Intermediate to advanced
212 pages
5h 34m
English
We use the sum of squares formula to compute the loss function, as follows:

Here, y - ypred is the difference between the predicted and actual outputs.
We can implement it as follows:
loss = np.square(y_pred - y).sum()
We're now calculating the gradient descent with respect to the loss function. The gradient of a function, such as the derivative, is the slope of the tangent of the graph of that function. Gradient descent finds the steepest slope and adjusts the weights according to that slope:

The preceding diagram makes gradient ...
Read now
Unlock full access