
What is the Chain Rule
Chain rule은 composite function에 대한 derivative를 구하는 방법임.
ddx[f(g(x))]=f′(g(x))g′(x)
Chain Rule of Multi-variate Functions
n-dimensional vector x의 각 component가 xi(t)라는 scalar function이라면,
x를 input으로 하는 multi-variate function z=f(x)의
scalar t에 대한 ordinary derivative는 다음과 같이 구함
dzdt=n∑i=1∂f∂xidxidt
- 단, xi들이 모두 t에 대해 differentiable이어야 하며, z도 모든 xi에 대해 미분가능해야함.
위의 식은 다음과 같이 표기할 수도 있음.
dzdt=∇f(x(t))⋅x′(t)=∇x′(t)f(x(t))
- x′(t) : tangent vector of x(t)
- 즉, x의 미세한 이동에 대한 directional derivative가 됨.
chain rule의 vector form은 다음 동영상을 참고: https://youtu.be/qZlBjnC3iro
chain rule과 directional derivative의 관계는 다음 동영상을 참고.: https://youtu.be/m2mW2FQJgEE
n-dimensional vector x들의 각 component까지
xi(t)라는 multi-variate function로 확장 (여기서 t는 m-dimentional vector)할 경우,
x를 input으로 하는 multi-variate function z=f(x)의
tj에 대해 partial derivative는 다음과 같이 구해짐.
∂z∂tj=n∑i=1∂f∂xi∂xi∂tj
where z=f(x),x=⟨x1(t),…,xn(t)⟩,t=⟨t1,…,tm⟩
어느 경우나, outside function을 먼저 처리하고 나서, inside function을 처리하고 이들을 곱하는 형태임.
ML에서의 사용법.
Deep Artificial Neural Network의 경우, Training에서 사용하는 Backpropagation을 가능하게 해주는 핵심요소임.
Reference
Chain rule (video) | Khan Academy
Learn for free about math, art, computer programming, economics, physics, chemistry, biology, medicine, finance, history, and more. Khan Academy is a nonprofit with the mission of providing a free, world-class education for anyone, anywhere.
www.khanacademy.org
https://dsaint31.github.io/math/math-week03/
[Math] Week 03
Limit and Continuity
dsaint31.github.io
'... > Math' 카테고리의 다른 글
[Math] Lagrange Method or Lagrange Multiplier Method (0) | 2023.06.26 |
---|---|
[Math] Tangent Vector (0) | 2023.06.24 |
[Math] Gradient (구배, 기울기, 경사, 경도) Vector (0) | 2023.06.24 |
[Math] Directional Derivative (방향도함수) (0) | 2023.06.23 |
[Math] Partial Derivatives (편도함수) (0) | 2023.06.23 |