Gradient descent

Gradient descent weight update equation: w := w - α * ∇J(w)

Gradient descent

Gradient descent weight update equation: w := w - α * ∇J(w)

Gradient descent is an optimization algorithm used to minimize functions by iteratively moving towards the steepest descent direction.

The weight update equation w := w - α * ∇J(w) represents the core of gradient descent, where w is the current weight vector, α (alpha) is the learning rate, and ∇J(w) is the gradient of the cost function J with respect to the weights w.

This equation ensures that the weights are adjusted in the direction that reduces the cost function, leading to convergence towards the minimum value of J.

Example

Suppose we have a cost function J(w) = (w - 3)², the gradient ∇J(w) = 2(w - 3). If our current weight w = 5 and learning rate α = 0.1, the weight update would be w := 5 - 0.1 * 2(5 - 3) = 5 - 0.1 * 4 = 4.6.

Understanding the weight update equation is crucial for implementing gradient descent in machine learning models, enabling them to learn and minimize error effectively.

Related concepts

One email a day: 5 concepts + the 5 stories that matter →

Swipe through 100 ML concepts daily

Open TickerNews