What is the difference between Batch Gradient Descent and Stochastic Gradient Descent (SGD)?

What is the difference between Batch Gradient Descent and Stochastic Gradient Descent (SGD)?

Approach: Compare the number of samples used to update weights.

Batch Gradient Descent computes the gradient of the loss function with respect to the entire dataset. SGD computes the gradient and updates parameters using only a single random training example. SGD is faster but noisier.

Follow-up: What is Mini-batch Gradient Descent?

Key concepts: batch size, epochs, noise.