This commit is contained in:
Morten Hjorth-Jensen
2023-11-21 06:16:54 +01:00
parent a854a3e9c0
commit 06b09eb681
173 changed files with 13894 additions and 3718 deletions
@@ -353,6 +353,16 @@ const thebe_selector_output = ".output, .cell_output"
Week 45, Recurrent Neural Networks
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="week46.html">
Week 46: Decision Trees, Ensemble methods and Random Forests
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="week47.html">
Week 47: From Decision Trees to Ensemble Methods, Random Forests and Boosting Methods and Summary of Course
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
@@ -367,7 +377,12 @@ const thebe_selector_output = ".output, .cell_output"
</li>
<li class="toctree-l1">
<a class="reference internal" href="project2.html">
Project 2 on Machine Learning, deadline November 13 (Midnight)
Project 2 on Machine Learning, deadline November 17 (Midnight)
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="project3.html">
Project 3 on Machine Learning, deadline December 18 (midnight), 2023
</a>
</li>
</ul>
@@ -1067,11 +1082,11 @@ which equals</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_8738/483257001.py:18: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_15458/483257001.py:18: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().
ax = fig.gca(projection=&quot;3d&quot;)
</pre></div>
</div>
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;mpl_toolkits.mplot3d.art3d.Poly3DCollection at 0x12b1c2700&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;mpl_toolkits.mplot3d.art3d.Poly3DCollection at 0x12463a760&gt;
</pre></div>
</div>
<img alt="_images/chapteroptimization_61_2.png" src="_images/chapteroptimization_61_2.png" />
@@ -1129,7 +1144,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 0x12e9e6280&gt;]
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x127461970&gt;]
</pre></div>
</div>
<img alt="_images/chapteroptimization_69_1.png" src="_images/chapteroptimization_69_1.png" />
@@ -1386,11 +1401,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>[0.33015882 4.55906894]
[[4.11836068]
[2.85949635]]
[[4.11836068]
[2.85949635]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[0.27151245 4.21908927]
[[4.2144122 ]
[2.86528733]]
[[4.2144122 ]
[2.86528733]]
</pre></div>
</div>
<img alt="_images/chapteroptimization_123_1.png" src="_images/chapteroptimization_123_1.png" />
@@ -1419,9 +1434,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>[[4.13451895]
[2.8383548 ]]
[4.19783086] [2.93535577]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[4.08838465]
[3.00383795]]
[4.10031273] [3.04626011]
</pre></div>
</div>
</div>
@@ -1492,10 +1507,10 @@ C_{\text{ridge}}(\beta) = \frac{1}{n}||X\beta -\mathbf{y}||^2 + \lambda ||\beta|
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[4.12575322]
[2.87918262]]
[[4.08876865]
[2.90510842]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[3.81243166]
[3.07844345]]
[[3.80101942]
[3.08513055]]
</pre></div>
</div>
<img alt="_images/chapteroptimization_132_1.png" src="_images/chapteroptimization_132_1.png" />
@@ -1745,15 +1760,15 @@ function.</p>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
[[3.78515112]
[3.19029687]]
Eigenvalues of Hessian Matrix:[0.30739146 4.15768662]
[[3.56486674]
[3.29918458]]
Eigenvalues of Hessian Matrix:[0.2756303 4.36170438]
theta from own gd
[[3.78515112]
[3.19029687]]
[[3.56486674]
[3.29918458]]
theta from own sdg
[[3.81425332]
[3.25285802]]
[[3.52208436]
[3.31774469]]
</pre></div>
</div>
<img alt="_images/chapteroptimization_148_1.png" src="_images/chapteroptimization_148_1.png" />