update lecture notes

This commit is contained in:
Morten Hjorth-Jensen
2024-10-28 06:15:26 +01:00
parent d58daeae80
commit d6bb9335d0
158 changed files with 29822 additions and 2310 deletions
+26 -25
View File
@@ -348,6 +348,11 @@ const thebe_selector_output = ".output, .cell_output"
Exercises week 43
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="week44.html">
Week 44, Convolutional Neural Networks (CNN)
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
@@ -1827,7 +1832,7 @@ which equals</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;mpl_toolkits.mplot3d.art3d.Poly3DCollection at 0x1220ecf70&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;mpl_toolkits.mplot3d.art3d.Poly3DCollection at 0x120b67a60&gt;
</pre></div>
</div>
<img alt="_images/week39_82_1.png" src="_images/week39_82_1.png" />
@@ -1885,7 +1890,7 @@ which equals</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x122eac100&gt;]
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x1213d5ee0&gt;]
</pre></div>
</div>
<img alt="_images/week39_90_1.png" src="_images/week39_90_1.png" />
@@ -2179,11 +2184,11 @@ when <span class="math notranslate nohighlight">\(||\nabla_\beta C(\beta_k) || \
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Eigenvalues of Hessian Matrix:[0.2823954 4.41825413]
[[3.80708727]
[3.19057517]]
[[3.80708727]
[3.19057517]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Eigenvalues of Hessian Matrix:[0.31492096 4.28033995]
[[3.6006178 ]
[3.29753883]]
[[3.6006178 ]
[3.29753883]]
</pre></div>
</div>
<img alt="_images/week39_153_1.png" src="_images/week39_153_1.png" />
@@ -2214,9 +2219,9 @@ when <span class="math notranslate nohighlight">\(||\nabla_\beta C(\beta_k) || \
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[3.93061247]
[3.05485826]]
[3.94361404] [3.09345236]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[3.87513212]
[3.12510307]]
[3.90280702] [3.15433894]
</pre></div>
</div>
</div>
@@ -2316,11 +2321,11 @@ minimum of this function.</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Eigenvalues of Hessian Matrix:[0.28261591 4.24106633]
[[4.11425439]
[2.70819495]]
[[4.11313433]
[2.70917646]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Eigenvalues of Hessian Matrix:[0.28372329 4.0956114 ]
[[3.8980893 ]
[3.08479726]]
[[3.89868561]
[3.08425705]]
</pre></div>
</div>
<img alt="_images/week39_166_1.png" src="_images/week39_166_1.png" />
@@ -2434,7 +2439,7 @@ minimum of this function.</p>
&gt;29 f([0.00115631]) = 0.00000
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_94310/394505933.py:33: DeprecationWarning: Conversion of an array with ndim &gt; 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_20948/394505933.py:33: DeprecationWarning: Conversion of an array with ndim &gt; 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
print(&#39;&gt;%d f(%s) = %.5f&#39; % (i, solution, solution_eval))
</pre></div>
</div>
@@ -2545,7 +2550,7 @@ minimum of this function.</p>
&gt;29 f([6.17748881e-07]) = 0.00000
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_94310/476849792.py:39: DeprecationWarning: Conversion of an array with ndim &gt; 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_20948/476849792.py:39: DeprecationWarning: Conversion of an array with ndim &gt; 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
print(&#39;&gt;%d f(%s) = %.5f&#39; % (i, solution, solution_eval))
</pre></div>
</div>
@@ -3607,14 +3612,12 @@ first example shows results with ordinary leats squares.</p>
[[3.94499279]
[3.03306538]]
Eigenvalues of Hessian Matrix:[0.31248425 4.44418124]
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own gd
theta from own gd
[[3.94499279]
[3.03306538]]
</pre></div>
</div>
<img alt="_images/week39_263_2.png" src="_images/week39_263_2.png" />
<img alt="_images/week39_263_1.png" src="_images/week39_263_1.png" />
</div>
</div>
</div>
@@ -3903,14 +3906,12 @@ beta from own Newton code
[[4.0586484]
[3.0718316]]
Eigenvalues of Hessian Matrix:[0.29860173 3.8931686 ]
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own gd
theta from own gd
[[4.0586484]
[3.0718316]]
</pre></div>
</div>
<img alt="_images/week39_269_2.png" src="_images/week39_269_2.png" />
<img alt="_images/week39_269_1.png" src="_images/week39_269_1.png" />
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own sdg
</pre></div>
</div>