[Math] Chain Rule (연쇄법칙)

2023. 6. 24. 09:39·.../Math
728x90
728x90

What is the Chain Rule

Chain rule은 composite function에 대한 derivative를 구하는 방법임.

$$\displaystyle \frac{d}{dx}\left[f\left(g(x)\right)\right]= f^\prime \left(g(x)\right) g^\prime(x)$$


Chain Rule of Multi-variate Functions

$n$-dimensional vector $\bf{x}$의 각 component가 $x_i(t)$라는 scalar function이라면,

$\bf{x}$를 input으로 하는 multi-variate function $z=f(\textbf{x})$의

scalar $t$에 대한 ordinary derivative는 다음과 같이 구함 

 

$$\frac{dz}{dt}=\displaystyle \sum_{i=1}^n \frac{\partial f}{\partial x_i} \frac{d x_i}{d t}$$

 

  • 단, $x_i$들이 모두 $t$에 대해 differentiable이어야 하며, $z$도 모든 $x_i$에 대해 미분가능해야함.

위의 식은 다음과 같이 표기할 수도 있음.

$$\frac{dz}{dt}=\nabla f (\textbf{x}(t))\cdot \textbf{x}^\prime (t) =\color{red}{\nabla_{\textbf{x}^\prime(t)}f(\textbf{x}(t))}$$

  • $\textbf{x}^\prime (t)$ : tangent vector of $\textbf{x}(t)$
  • 즉, $\textbf{x}$의 미세한 이동에 대한 directional derivative가 됨.

chain rule의 vector form은 다음 동영상을 참고: https://youtu.be/qZlBjnC3iro

chain rule과 directional derivative의 관계는 다음 동영상을 참고.: https://youtu.be/m2mW2FQJgEE

 

$n$-dimensional vector $\bf{x}$들의 각 component까지

$x_i(\textbf{t})$라는 multi-variate function로 확장 (여기서 $\bf{t}$는 $m$-dimentional vector)할 경우,

$\bf{x}$를 input으로 하는 multi-variate function $z=f(\textbf{x})$의

$t_j$에 대해 partial derivative는 다음과 같이 구해짐.

 

$$\frac{\partial z}{\partial t_j}=\displaystyle \sum_{i=1}^n \frac{\partial f}{\partial x_i} \frac{\partial x_i}{\partial t_j}$$

$$\text{where }z=f(\textbf{x}), \textbf{x}=\langle x_1(\textbf{t}), \dots, x_n(\textbf{t}) \rangle, \textbf{t}=\langle t_1, \dots, t_m \rangle$$

 

어느 경우나, outside function을 먼저 처리하고 나서, inside function을 처리하고 이들을 곱하는 형태임.


ML에서의 사용법.

Deep Artificial Neural Network의 경우, Training에서 사용하는 Backpropagation을 가능하게 해주는 핵심요소임.


Reference

https://www.khanacademy.org/math/differential-calculus/dc-chain/dc-chain-rule/v/chain-rule-introduction

 

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://youtu.be/NO3AqAaAE6o

 

https://dsaint31.github.io/math/math-week03/

 

[Math] Week 03

Limit and Continuity

dsaint31.github.io


 

728x90

'... > 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
'.../Math' 카테고리의 다른 글
  • [Math] Lagrange Method or Lagrange Multiplier Method
  • [Math] Tangent Vector
  • [Math] Gradient (구배, 기울기, 경사, 경도) Vector
  • [Math] Directional Derivative (방향도함수)
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (787)
      • Private Life (15)
      • Programming (206)
        • DIP (116)
        • ML (35)
      • Computer (120)
        • CE (54)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (368)
        • Signals and Systems (115)
        • Math (176)
        • Linear Algebra (33)
        • Physics (43)
        • 인성세미나 (1)
      • 정리필요. (61)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (7)
        • PET Study 2009 (1)
        • 방사선 장해방호 (5)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    Vector
    function
    signals_and_systems
    fourier transform
    Probability
    random
    linear algebra
    signal_and_system
    ML
    Term
    Python
    인허가제도
    opencv
    numpy
    cv2
    Optimization
    Programming
    math
    SIGNAL
    SS
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[Math] Chain Rule (연쇄법칙)
상단으로

티스토리툴바