What is a gradient and how does it relate to optimization?medium
Answer
A gradient is the vector of partial derivatives of a multi-variable function - it points in the direction of steepest increase. Moving opposite the gradient decreases the function (gradient descent).
Explanation
For a loss function L(w₁, w₂, ..., wₙ), the gradient ∇L = [∂L/∂w₁, ∂L/∂w₂, ..., ∂L/∂wₙ]. Each element tells you how much the loss changes with a small change in that weight. The gradient has magnitude (how steep) and direction (which way). Optimization: take a small step in the negative gradient direction -> reduce loss. The gradient is zero at any critical point (minimum, maximum, or saddle point).
Follow-upWhat is the Jacobian and how does it extend the gradient concept?