reading-notes

Linear Regression, Gradient Descent, Batch Gradient Descent, and Stochastic Gradient Descent

Linear Regression

Concepts

Basic Algorithm

Use Cases

Gradient Descent

Concepts

Basic Algorithm

  1. Initialize variables (weights) with random values.
  2. Calculate the gradient of the function with respect to each variable.
  3. Update the variables by subtracting a fraction (learning rate) of the gradient.
  4. Repeat steps 2 and 3 until convergence or a maximum number of iterations.

Use Cases

Batch Gradient Descent

Concepts

Basic Algorithm

  1. Initialize variables (weights) with random values.
  2. Calculate the gradient of the function with respect to each variable, using the entire dataset.
  3. Update the variables by subtracting a fraction (learning rate) of the gradient.
  4. Repeat steps 2 and 3 until convergence or a maximum number of iterations.

Use Cases

Stochastic Gradient Descent

Concepts

Basic Algorithm

  1. Initialize variables (weights) with random values.
  2. Randomly select a data point from the dataset.
  3. Calculate the gradient of the function with respect to each variable, using the selected data point.
  4. Update the variables by subtracting a fraction (learning rate) of the gradient.
  5. Repeat steps 2-4 until convergence or a maximum number of iterations.

Use Cases