Derivatives and Partial Derivatives
Training a model is a long series of small questions: "If I nudge this weight up a little, does the error go up or down, and by how much?" The derivative answers that question. With several weights, the partial derivative answers it for one weight at a time.
The rule
Derivative: output change per tiny input change. Partial: freeze every other input.
A derivative is the slope of a function at a point. Take . Its derivative is , so at the slope is 6. That means a tiny nudge in changes about six times as much: and , a rise of about .
The rules you need most:
- Power rule: the derivative of is . So gives .
- Constants vanish: a number on its own has slope 0.
- Constant multiples stay: the derivative of is 3.
- Sums split: differentiate each term separately.
The sign matters as much as the size. A positive slope means increasing increases . A negative slope means increasing decreases . To reduce an error, move the weight against the slope.
A model usually has many weights. A partial derivative measures the slope along one of them while every other weight is treated as a fixed number. For :
- , because is frozen, so is just times .
- , because has no in it and vanishes.
At these are 8 and 3.