Question: what is the difference between cost function and gradient descent?
Answer: 4 Answers. A cost function is something you want to minimize. For example, your cost function might be the sum of squared errors over your training set. Gradient descent is a method for finding the minimum of a function of multiple variables.