Derivative Definition
When w goes up by a tiny amount ε, causing J(w) to go up by k × ε, we say the derivative of J(w) with respect to w equals k.
Derivative Definition
When w goes up by a tiny amount ε, causing J(w) to go up by k × ε, we say the derivative of J(w) with respect to w equals k.
w = 3
w = 2
w = -3
import sympy as spw, J = sp.symbols('w J')
# Example 1: J = w²J = w**2dJ_dw = sp.diff(J, w) # Returns 2*wdJ_dw.subs(w, 2) # Returns 4
Function | Derivative Formula | Value at w=2 |
---|---|---|
w² | 2w | 4 |
w³ | 3w² | 12 |
w | 1 | 1 |
1/w | -1/w² | -1/4 |
For J(w) = w³:
For J(w) = w:
For J(w) = 1/w:
For functions of a single variable:
For functions of multiple variables:
The derivative quantifies how sensitive a function is to small changes in its input. In neural networks, derivatives guide parameter updates during training - we move parameters in the direction that most efficiently reduces the cost function. The next video will explore how derivatives work in neural networks through computation graphs.