3. Gradient Descent (Basic)
Created: August 4, 2021 10:05 AM
Reviewed: No
- Differentiation
Numpy: sympy.diff
import sympy as sym
from sympy.abc import x
sym.diff(sym.poly(x**2 + 2*x + 3), x) # Differenciate by x
Poly(2*x + 2, x, domain = 'zz')
- Gradient ascent
1) f'(x) < 0
x' = x + f'(x) < x
2) f'(x) > 0
x' = x + f'(x) > x
x' moves in the direction where f(x) increases.
- This does not guarantee that f(x') > f(x).
→ Gradient ascent is used to find the local maximum.
- Gradient descent
1) f'(x) < 0
x' = x - f'(x) > x
2) f'(x) > 0
x' = x - f'(x) < x
x' moves in the direction where f(x) decreases.
- This does not guarantee that f(x') < f(x).
→ Gradient descent is used to find the local minimum.
- Learning rate
is learning rate.
- Partial derivative
- Gradient vector
- is nabla
Use instead of to update at the same time.
is the fastest decreasing direction.
'AI Tech - Naver Boostcamp > 1. Python & AI Math' 카테고리의 다른 글
2. What is matrix? (0) | 2021.08.09 |
---|---|
1. What is vector? (0) | 2021.08.03 |
댓글