我是靠谱客的博主 爱笑仙人掌,最近开发中收集的这篇文章主要介绍Derivatives of matrix1. matrix V scalar2. scalar V matrix3. vector V vector4. Examples5. Reference,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
- matrix V scalar
- scalar V matrix
- vector V vector
- Examples
- 1 Derivative of inverse matrix
- 2 Derivative of trace
- 3 Applications
- 4 Derivative of determinant
- Reference
1. matrix V scalar
∂A(x)∂x=[∂A(x)ij∂x]i,j
2. scalar V matrix
f(A)∂A=[∂f(x)∂Aij]i,j
3. vector V vector
g→(V→)∂V→=⎡⎣⎢g→(V→)i∂V→j⎤⎦⎥i,j
4. Examples
4.1 Derivative of inverse matrix
⇒⇒⇒A−1A=I∂A−1A∂x=0∂A−1∂xA+A−1∂A∂x=0∂A−1∂x=−A−1∂A∂xA−1
For
x=Aij
with
A
being nonsymmetric, we have
and
∂A−1∂Aij=−A−1IijA−1
and
∂2A−1∂Aij∂Akr=∂∂A−1∂Akr∂Aij=−∂A−1IkrA−1∂Aij=−∂A−1∂AijIkrA−1−A−1Ikr∂A−1IkrA−1∂Aij=−(−A−1IijA−1)IkrA−1−A−1Ikr(−A−1IijA−1)Ikr=A−1IijA−1IkrA−1+A−1IkrA−1IijA−1
For
x=Aij
with
A
being symmetric, we have
Then all can be replaced by I∗ij
4.2 Derivative of trace
If A is not symmetric:
∂tr(A)∂A=[∂tr(A)∂Aij]ij=[tr(∂A∂Aij)]ij=tr[Iij]ij=In
If A is symmetric:
∂tr(A)∂A=[∂tr(A)∂Aij]ij=[tr(∂A∂Aij)]ij=tr[Iij+Iji+δjiIji]ij=In
If S is not symmetric:
⇒⇒f=tr(S−1B)∂f∂Sij=∂tr(S−1B)∂Sij=tr(∂S−1BSij)=−tr(S−1IijS−1B)=tr(IijS−1BS−1)=Θ=S−1BS−1tr(IijΘ)=Θji∂tr(S−1B)∂S=−(S−1BS−1)T
If S is symmetric:
⇒⇒f=tr(S−1B)∂f∂Sij=∂tr(S−1B)∂Sij=tr(∂S−1BSij)=−tr(I∗ijΘ)=−[Θji+Θij−δijΘij]∂tr(S−1B)∂S=−[S−1(B+BT)S−1−diag(S−1BS−1)]
4.3 Applications
∂tr(AB)∂A=BT
∂tr(ATB)∂A=B
∂tr(ATSA)∂A=[∂tr(ATSA)∂Aij]ij=[tr(IjiSA+ATSIij)]ij=SA+SATA=(S+ST)A
S is symmetric
∂tr((ATSA)−1R)∂A=⎡⎣⎢⎢⎢∂tr((ATSA)−1R)∂Aij⎤⎦⎥⎥⎥ij=⎡⎣⎢⎢tr⎛⎝⎜⎜∂(ATSA)−1R∂Aij⎞⎠⎟⎟⎤⎦⎥⎥ij=[tr(−(ATSA)−1∂ATSA∂Aij(ATSA)−1R)]ij=[tr(−(ATSA)−1(IjiSA+ATSIij)(ATSA)−1R)]ij=[−tr(IjiSA(ATSA)−1R(ATSA)−1)]ij+[−tr((ATSA)−1R(ATSA)−1ATSIij)]ij=−SA(ATSA)−1R(ATSA)−1−SA(ATSA)−1RT(ATSA)−1=−SA(ATSA)−1(R+RT)(ATSA)−1
∂tr((ATS2A)−1(ATS1A))∂A=∂tr((AT1S2A1)−1(ATS1A))∂A∣∣∣∣∣∣A1=A+∂tr((ATS2A)−1(AT2S1A2))∂A∣∣∣∣∣∣A2=A=−2S2A(ATS2A)−1(ATS1A)(ATS2A)−1+2S1A(ATS2A)−1
4.4 Derivative of determinant
∂|R|∂Rij=Cij
which is its cofactor(from the cofactor expansion). Then
∂|R|∂R=C
which is the adjoint matrix. Then from the fact that
|R|I=RCT
we have
∂|R|∂R=|R|R−1T
Furthermore
∂ln|R|∂R=1|R|∂|R|∂R=R−1T
5. Reference
reference of book “Introduction to Statistical Pattern Recognition, second edition.”
最后
以上就是爱笑仙人掌为你收集整理的Derivatives of matrix1. matrix V scalar2. scalar V matrix3. vector V vector4. Examples5. Reference的全部内容,希望文章能够帮你解决Derivatives of matrix1. matrix V scalar2. scalar V matrix3. vector V vector4. Examples5. Reference所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复