Skip to content

Commit

Permalink
fix no-linear
Browse files Browse the repository at this point in the history
  • Loading branch information
0382 committed Oct 22, 2024
1 parent 9bfcf62 commit f5f8a67
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 170 deletions.
Binary file added icon/fig9.7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/fig9.8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/fig9.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 6 additions & 11 deletions node365.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,13 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6365" href="node366.html">The Difference Between a</a>
<b>上一级:</b><a name="tex2html6359" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6353" href="node364.html">几何技术细节</a>


<b>下一节:</b><a name="tex2html6365" href="node366.html">切线与微分的区别</a>
<b>上一级:</b><a name="tex2html6359" href="node364.html">几何技术</a>
<b>上一节:</b><a name="tex2html6353" href="node364.html">几何技术</a>
<br>
<br>
<!--End of Navigation Panel--><h3><a name="SECTION001846100000000000000"></a>
<a name="43758"></a>
<br>
流形
</h3>

Expand Down Expand Up @@ -117,11 +114,9 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6365" href="node366.html">The Difference Between a</a>
<b>上一级:</b><a name="tex2html6359" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6353" href="node364.html">几何技术细节</a>


<b>下一节:</b><a name="tex2html6365" href="node366.html">切线与微分的区别</a>
<b>上一级:</b><a name="tex2html6359" href="node364.html">几何技术</a>
<b>上一节:</b><a name="tex2html6353" href="node364.html">几何技术</a>
<!--End of Navigation Panel-->
<address>
Susan Blackford
Expand Down
16 changes: 6 additions & 10 deletions node366.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6379" href="node367.html">Inner Products, Gradients, and</a>
<b>上一级:</b><a name="tex2html6373" href="node364.html">几何技术细节</a>
<b>下一节:</b><a name="tex2html6379" href="node367.html">内积、梯度与微分</a>
<b>上一级:</b><a name="tex2html6373" href="node364.html">几何技术</a>
<b>上一节:</b><a name="tex2html6367" href="node365.html">流形</a>


<br>
<br>
<!--End of Navigation Panel--><h3><a name="SECTION001846200000000000000">
Expand Down Expand Up @@ -104,12 +102,12 @@
<p>
虽然切线是<span class="math-inline">n \times k</span>矩阵,因此有相关的微分算子,但<em>微分</em>是另一回事。给定一个<span class="math-inline">C^\infty</span>函数<span class="math-inline">f</span>和一个点<span class="math-inline">Y</span>,可以考虑<span class="math-inline">H \in {\mathcal R}^{n \times k}</span><span class="math-inline">H</span>不一定是切线)的方程<span class="math-inline">D_H f</span>。这个表达式在<span class="math-inline">H</span>中线性,并取某个实数值。因此,可以将其表示为向量空间<span class="math-inline">{\mathcal R}^{n \times k}</span>上的线性函数,

<div class="math-display">D_H f = \tr( H^* Z),</div>
<div class="math-display">D_H f = \mathrm{tr}( H^* Z),</div>

对于某个适当的<span class="math-inline">n \times k</span>矩阵<span class="math-inline">Z</span>,其值取决于<span class="math-inline">f</span><span class="math-inline">Y</span>附近的一阶行为。我们将这个<span class="math-inline">Z</span>矩阵识别为<span class="math-inline">f</span><span class="math-inline">Y</span>点的微分<span class="math-inline">df</span>。这与样本问题中<code>dF</code>函数计算的微分相同。

<p>
对于任何约束流形,光滑函数<span class="math-inline">f</span>的微分可以在不需了解流形本身的情况下计算。可以直接使用环境空间(在我们情况下是无约束的<span class="math-inline">{\mathcal R}^{n \times k}</span>导数)中的微分。如果将微分算子限制为仅在切线方向上,那么仍然可以使用无约束的<span class="math-inline">df</span><span class="math-inline">\tr ( H^* df )</span>中计算<span class="math-inline">D_H f</span>,其中<span class="math-inline">H \in T_Y(\mathrm{Stief}(n,k))</span>。这就是为什么生成<code>dF</code>函数不需要几何知识的原因。
对于任何约束流形,光滑函数<span class="math-inline">f</span>的微分可以在不需了解流形本身的情况下计算。可以直接使用环境空间(在我们情况下是无约束的<span class="math-inline">{\mathcal R}^{n \times k}</span>导数)中的微分。如果将微分算子限制为仅在切线方向上,那么仍然可以使用无约束的<span class="math-inline">df</span><span class="math-inline">\mathrm{tr} ( H^* df )</span>中计算<span class="math-inline">D_H f</span>,其中<span class="math-inline">H \in T_Y(\mathrm{Stief}(n,k))</span>。这就是为什么生成<code>dF</code>函数不需要几何知识的原因。

<p>
<hr><!--Navigation Panel-->
Expand All @@ -129,11 +127,9 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6379" href="node367.html">Inner Products, Gradients, and</a>
<b>上一级:</b><a name="tex2html6373" href="node364.html">几何技术细节</a>
<b>下一节:</b><a name="tex2html6379" href="node367.html">内积、梯度与微分</a>
<b>上一级:</b><a name="tex2html6373" href="node364.html">几何技术</a>
<b>上一节:</b><a name="tex2html6367" href="node365.html">流形</a>


<!--End of Navigation Panel-->
<address>
Susan Blackford
Expand Down
39 changes: 12 additions & 27 deletions node367.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,14 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6393" href="node368.html">Getting Around</a>
<b>上一级:</b><a name="tex2html6387" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6381" href="node366.html">The Difference Between a</a>


<b>下一节:</b><a name="tex2html6393" href="node368.html">绕过<span class="math-inline">\mathrm{Stief}(n,k)</span></a>
<b>上一级:</b><a name="tex2html6387" href="node364.html">几何技术</a>
<b>上一节:</b><a name="tex2html6381" href="node366.html">切线与微分的区别</a>
<br>
<br>
<!--End of Navigation Panel--><h3><a name="SECTION001846300000000000000"></a>
<a name="43813"></a>
<a name="43814"></a>
<br>
内积、梯度与微分
</h3>

Expand All @@ -94,26 +91,16 @@
然而,如果切空间具有内积,我们可以找到一种有用的方式将<span class="math-inline">df</span>唯一地与切向量对应起来。设<span class="math-inline">ip(H_1,H_2)</span>
<span class="math-inline">\mathrm{Stief}(n,k)</span><span class="math-inline">Y</span>处的切空间上的对称非退化双线性形式。然后可以通过以下方式隐式定义梯度<span class="math-inline">G</span>

<div class="math-display">ip(G,H) = \tr ( H^* df) = D_H f.</div>
<div class="math-display">ip(G,H) = \mathrm{tr} ( H^* df) = D_H f.</div>

由于<span class="math-inline">ip</span>是非退化形式,这足以定义<span class="math-inline">G</span>。函数<code>tangent</code>执行从微分到切向量的投影(如图<a href="node367.html#gradientfig">9.7</a>所示)。这一操作由<code>grad</code>执行,以产生目标函数的梯度。

<p>

<p></p>
<div align="CENTER"><a name="gradientfig"></a><a name="43821"></a>
<table>
<caption align="BOTTOM"><strong>图9.7:</strong>
<span class="math-inline">F(Y)</span>的无约束微分可以投影到切空间,以获得<span class="math-inline">F</span>的协变梯度<span class="math-inline">G</span></caption>
<tr><td><img
width="460" height="184" border="0"
src="img3522.png"
alt="\begin{figure}\begin{center}
\leavevmode
\epsfxsize =4.0 in
\epsfbox{gradient.eps}\end{center}\end{figure}"></td></tr>
</table>
</div><p></p>
<div style="text-align: center;">
<a name="gradientfig"></a><a name="43821"></a>
<img src="icon/fig9.7.png" alt="图9.7:F(Y)的无约束微分可以投影到切空间,以获得F的协变梯度G。">
<figcaption>图9.7:F(Y)的无约束微分可以投影到切空间,以获得F的协变梯度G。</figcaption>
</div>

<p>
<hr><!--Navigation Panel-->
Expand All @@ -133,11 +120,9 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6393" href="node368.html">Getting Around</a>
<b>上一级:</b><a name="tex2html6387" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6381" href="node366.html">The Difference Between a</a>


<b>下一节:</b><a name="tex2html6393" href="node368.html">绕过<span class="math-inline">\mathrm{Stief}(n,k)</span></a>
<b>上一级:</b><a name="tex2html6387" href="node364.html">几何技术</a>
<b>上一节:</b><a name="tex2html6381" href="node366.html">切线与微分的区别</a>
<!--End of Navigation Panel-->
<address>
Susan Blackford
Expand Down
36 changes: 14 additions & 22 deletions node368.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<html>
<head>
<title>Getting Around </title>
<title>绕过\mathrm{Stief}(n,k)</title>
<meta charset="utf-8">
<meta name="description" content="Getting Around ">
<meta name="description" content="绕过\mathrm{Stief}(n,k)">
<meta name="keywords" content="book, math, eigenvalue, eigenvector, linear algebra, sparse matrix">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script>
Expand Down Expand Up @@ -68,12 +68,11 @@
<br>
<b>下一节:</b><a name="tex2html6407" href="node369.html">协变微分法</a>
<b>上一级:</b><a name="tex2html6401" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6395" href="node367.html">Inner Products, Gradients, and</a>


<b>上一节:</b><a name="tex2html6395" href="node367.html">内积、梯度与微分</a>
<br>
<br>
<!--End of Navigation Panel--><h3><a name="SECTION001846400000000000000">
<!--End of Navigation Panel-->
<h3><a name="SECTION001846400000000000000">
绕过<span class="math-inline">\mathrm{Stief}(n,k)</span></a>
</h3>

Expand All @@ -82,19 +81,14 @@

<p>
对于任何流形,更新<span class="math-inline">Y</span>的方法是求解一组形式为的微分<em>运动方程</em>
<p></p>
<div align="CENTER">

<img
width="149" height="78" border="0"
src="img3524.png"
alt="\begin{eqnarray*}
\frac{d}{dt} Y &amp;=&amp; H, \\
\frac{d}{dt} H &amp;=&amp; - \Gamma(H,H).
\end{eqnarray*}">
<br clear="ALL"></div><p></p>
<br clear="ALL"><p></p>
<br clear="ALL"><p></p>

<div class="math-display">
\begin{aligned}
\frac{d}{dt} Y &= H, \\
\frac{d}{dt} H &= - \Gamma(H,H).
\end{aligned}
</div>

其中<span class="math-inline">\Gamma</span>项的设计确保<span class="math-inline">H</span>始终保持为切向量,从而使路径保持在流形上。它被称为<em>联络</em>(联络项也依赖于<span class="math-inline">Y</span>)。

<p>
Expand Down Expand Up @@ -148,9 +142,7 @@
<br>
<b>下一节:</b><a name="tex2html6407" href="node369.html">协变微分法</a>
<b>上一级:</b><a name="tex2html6401" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6395" href="node367.html">Inner Products, Gradients, and</a>


<b>上一节:</b><a name="tex2html6395" href="node367.html">内积、梯度与微分</a>
<!--End of Navigation Panel-->
<address>
Susan Blackford
Expand Down
54 changes: 15 additions & 39 deletions node369.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,14 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6421" href="node370.html">Inverting the Covariant Hessian</a>
<b>下一节:</b><a name="tex2html6421" href="node370.html">反转协变Hessian矩阵</a>
<b>上一级:</b><a name="tex2html6415" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6409" href="node368.html">Getting Around</a>


<b>上一节:</b><a name="tex2html6409" href="node368.html">绕过<span class="math-inline">\mathrm{Stief}(n,k)</span></a>
<br>
<br>
<!--End of Navigation Panel--><h3><a name="SECTION001846500000000000000"></a>
<a name="43839"></a>
<a name="43840"></a>
<br>
协变微分
</h3>

Expand All @@ -87,38 +84,17 @@
特别是,人们可能想知道,如果从<span class="math-inline">Y</span>移动到<span class="math-inline">Y+\epsilon H</span>,梯度会变化多少。在流形上,这实际上可能是一个难以回答的问题。从技术上讲,<span class="math-inline">Y</span>处的梯度是<span class="math-inline">T_Y(\mathrm{Stief}(n,k))</span>的一个成员,而<span class="math-inline">Y+\epsilon H</span>处的梯度是<span class="math-inline">T_{Y+\epsilon H}(\mathrm{Stief}(n,k))</span>的一个成员。虽然在平坦空间中取它们的差值没有问题(见图<a href="node369.html#flathessianfig">9.8</a>),但如果这在弯曲空间中进行,可能会得到一个不属于任一点切空间的向量(见图<a href="node369.html#curvedhessianfig">9.9</a>)。

<p>

<p></p>
<div align="CENTER"><a name="flathessianfig"></a><a name="43850"></a>
<table>
<caption align="BOTTOM"><strong>图9.8:</strong>
在平坦空间中,比较相邻点的向量没有问题,因为所有向量都位于同一个切空间中。</caption>
<tr><td><img
width="460" height="162" border="0"
src="img3536.png"
alt="\begin{figure}\begin{center}
\leavevmode
\epsfxsize =4.0 in
\epsfbox{flathessian.eps}\end{center}\end{figure}"></td></tr>
</table>
</div><p></p>

<p>

<p></p>
<div align="CENTER"><a name="curvedhessianfig"></a><a name="43857"></a>
<table>
<caption align="BOTTOM"><strong>图9.9:</strong>
在弯曲流形中,比较相邻点的向量可能导致向量不在切空间中。</caption>
<tr><td><img
width="460" height="230" border="0"
src="img3537.png"
alt="\begin{figure}\begin{center}
\leavevmode
\epsfxsize =4.0 in
\epsfbox{curvedhessian.eps}\end{center}\end{figure}"></td></tr>
</table>
</div><p></p>
<div style="text-align: center;">
<a name="flathessianfig"></a><a name="43850"></a>
<img src="icon/fig9.8.png" alt="图9.8:在平坦空间中,比较相邻点的向量没有问题,因为所有向量都位于同一个切空间中。"/>
<figcaption>图9.8:在平坦空间中,比较相邻点的向量没有问题,因为所有向量都位于同一个切空间中。</figcaption>
</div>

<div style="text-align: center;">
<a name="curvedhessianfig"></a><a name="43857"></a>
<img src="icon/fig9.9.png" alt="图9.9:在弯曲流形中,比较相邻点的向量可能导致向量不在切空间中。"/>
<figcaption>图9.9:在弯曲流形中,比较相邻点的向量可能导致向量不在切空间中。</figcaption>
</div>

<p>
一种更复杂的方法是首先以某种方式将<span class="math-inline">Y+\epsilon H</span>处的梯度移动到<span class="math-inline">Y</span>,使其以平行方式从<span class="math-inline">Y+\epsilon H</span>翻译到<span class="math-inline">Y</span>,然后在相同的切空间中比较这两个梯度。可以检查,对于<span class="math-inline">V \in T_{Y+\epsilon H}(\mathrm{Stief}(n,k))</span>,规则
Expand Down Expand Up @@ -160,9 +136,9 @@
href="node422.html">
<button class="navigate">索引</button></a>
<br>
<b>下一节:</b><a name="tex2html6421" href="node370.html">Inverting the Covariant Hessian</a>
<b>下一节:</b><a name="tex2html6421" href="node370.html">反转协变Hessian矩阵</a>
<b>上一级:</b><a name="tex2html6415" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6409" href="node368.html">Getting Around</a>
<b>上一节:</b><a name="tex2html6409" href="node368.html">绕过<span class="math-inline">\mathrm{Stief}(n,k)</span></a>


<!--End of Navigation Panel-->
Expand Down
28 changes: 16 additions & 12 deletions node370.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,33 +69,39 @@
<b>下一节:</b><a name="tex2html6433" href="node371.html">常见问题</a>
<b>上一级:</b><a name="tex2html6427" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6423" href="node369.html">协变微分法</a>


<br>
<br>
<!--End of Navigation Panel--><h3><a name="SECTION001846600000000000000">
逆变海森矩阵的求逆(技术考量)</a>
协变海森矩阵的求逆(技术考量)</a>
</h3>

<p>
由于<span class="math-inline">\mathrm{Stief}(n,k)</span>的切空间是<span class="math-inline">{\mathcal R}^{n \times k}</span>的一个子空间,因此必须在该子空间上稳定地求逆变海森矩阵。这要求设计来求解<span class="math-inline">D_H G = V</span>以得到<span class="math-inline">H</span>的任何算法,实际上在最小二乘或其他某种意义上必须是伪逆变换器
由于<span class="math-inline">\mathrm{Stief}(n,k)</span>的切空间是<span class="math-inline">{\mathcal R}^{n \times k}</span>的一个子空间,因此必须在该子空间上稳定地求协变海森矩阵。这要求设计来求解<span class="math-inline">D_H G = V</span>以得到<span class="math-inline">H</span>的任何算法,实际上在最小二乘或其他某种意义上必须是伪协变换器

<p>
第二个考虑因素是,许多有用的函数<span class="math-inline">f(Y)</span>具有以下性质:对于所有块对角正交矩阵<span class="math-inline">Q</span><span class="math-inline">f(YQ) = f(Y)</span>(即,
<div class="math-display">Q =\left[\begin{array}{cccc}Q_1 & 0 & \cdots & 0 \cr0 & ......dotfill & \dotfill \cr0 & 0 & \cdots & Q_p\end{array}\right],</div>

<div class="math-display">Q =\left[\begin{array}{cccc}
Q_1 & 0 & \cdots & 0 \\
0 & Q_2 & \cdots & 0 \\
\cdots & \cdots & \cdots & \cdots \\
0 & 0 & \cdots & Q_p
\end{array}\right],</div>

其中<span class="math-inline">Q_i</span>是正交矩阵)。在这种情况下,所有形式如下的切向量

<div class="math-display">H = Y\left[\begin{array}{cccc}H_1 & 0 & \cdots & 0 \cr0 &......dotfill & \dotfill \cr0 & 0 & \cdots & H_p\end{array}\right],</div>
<div class="math-display">V =\left[\begin{array}{cccc}
H_1 & 0 & \cdots & 0 \\
0 & H_2 & \cdots & 0 \\
\cdots & \cdots & \cdots & \cdots \\
0 & 0 & \cdots & H_p
\end{array}\right],</div>

其中<span class="math-inline">H_i</span>是反对称的,具有性质<span class="math-inline">D_H f = 0</span>。这些额外的对称向量随后成为线性系统<span class="math-inline">D_H G = V</span>的零向量。由于这些零方向,切空间的有效维度降低了零空间的维度(这是由<code>dimension</code>函数返回的维度)。

<p>
因此,我们看到为了求逆变海森矩阵,我们必须小心使用一个稳定的求逆方案,该方案将投影出不符合无穷小约束方程的<span class="math-inline">H</span>分量以及那些在<span class="math-inline">f</span>的附加对称性方向上的分量。<code>invdgrad</code>函数通过共轭梯度程序执行逆变海森矩阵的稳定求逆,其中<code>dgrad</code>函数调用<code>nosym</code>函数来投影出任何额外的对称性分量。

<p>
因此,我们看到为了求协变海森矩阵,我们必须小心使用一个稳定的求逆方案,该方案将投影出不符合无穷小约束方程的<span class="math-inline">H</span>分量以及那些在<span class="math-inline">f</span>的附加对称性方向上的分量。<code>invdgrad</code>函数通过共轭梯度程序执行协变海森矩阵的稳定求逆,其中<code>dgrad</code>函数调用<code>nosym</code>函数来投影出任何额外的对称性分量。

<p>

<p>
<hr><!--Navigation Panel-->
Expand All @@ -118,8 +124,6 @@
<b>下一节:</b><a name="tex2html6433" href="node371.html">常见问题</a>
<b>上一级:</b><a name="tex2html6427" href="node364.html">几何技术细节</a>
<b>上一节:</b><a name="tex2html6423" href="node369.html">协变微分法</a>


<!--End of Navigation Panel-->
<address>
Susan Blackford
Expand Down
Loading

0 comments on commit f5f8a67

Please sign in to comment.