What is Gradient Descent?

Gradient Descent is an optimization algorithm used to minimize the loss function in a machine learning model. It works by iteratively adjusting the model's parameters (in this case, the weight and bias) to find the values that result in the lowest possible loss.

Key Concepts:

How it Works:

The algorithm starts with initial guesses for the weight and bias, often set to zero. It then calculates the gradient of the loss function with respect to each parameter. The weight and bias are updated in the direction that decreases the loss, using the formula:

New Weight \( w_{\text{new}} = w_{\text{old}} - \eta \cdot \frac{\partial L}{\partial w} \)

New Bias \( b_{\text{new}} = b_{\text{old}} - \eta \cdot \frac{\partial L}{\partial b} \)

This process repeats for a specified number of iterations or until the loss converges to a minimum value.

The "Optimal Regression Line" shown on the chart represents the best possible fit using all the data points. The gradient descent algorithm tries to approximate this line by minimizing the loss through iterative updates.

Explanation of Symbols:

Gradient Descent Demo

This demo shows how gradient descent works by training a linear model to predict travel time based on the number of stop signs.
Based on this example

Weight: 0

Bias: 0

Loss: 0