update of notes with proper links

This commit is contained in:
Morten Hjorth-Jensen
2024-10-08 06:27:31 +02:00
parent c51c668c16
commit 01613c2940
28 changed files with 1966 additions and 386 deletions
+130 -117
View File
@@ -324,6 +324,23 @@ const thebe_selector_output = ".output, .cell_output"
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
Projects
</span>
</p>
<ul class="nav bd-sidenav">
<li class="toctree-l1">
<a class="reference internal" href="project1.html">
Project 1 on Machine Learning, deadline October 7 (midnight), 2024
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="project2.html">
Project 2 on Machine Learning, deadline November 4 (Midnight)
</a>
</li>
</ul>
</div>
</nav> <!-- To handle the deprecated key -->
@@ -777,15 +794,15 @@ regression.</p>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
[[4.16413938]
[2.88594444]]
Eigenvalues of Hessian Matrix:[0.2965315 4.059181 ]
[[4.0846409]
[2.8352834]]
Eigenvalues of Hessian Matrix:[0.33241952 4.39292847]
theta from own gd
[[4.16413938]
[2.88594444]]
[[4.0846409]
[2.8352834]]
theta from own sdg
[[4.11131389]
[2.89069029]]
[[4.03188133]
[2.82130663]]
</pre></div>
</div>
<img alt="_images/exercisesweek41_5_1.png" src="_images/exercisesweek41_5_1.png" />
@@ -907,14 +924,14 @@ first example shows results with ordinary leats squares.</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.89044267]
[3.11620886]]
Eigenvalues of Hessian Matrix:[0.31812561 4.63042739]
[[3.89543945]
[3.14433067]]
Eigenvalues of Hessian Matrix:[0.30069427 4.55916434]
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own gd
[[3.89044267]
[3.11620886]]
[[3.89543945]
[3.14433067]]
</pre></div>
</div>
<img alt="_images/exercisesweek41_16_2.png" src="_images/exercisesweek41_16_2.png" />
@@ -985,73 +1002,73 @@ Eigenvalues of Hessian Matrix:[0.31812561 4.63042739]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
[[4.]
[3.]]
Eigenvalues of Hessian Matrix:[0.331075 4.25018094]
0 [-10.99619572] [-12.63347711]
1 [-0.06146873] [0.05293756]
2 [-0.05668052] [0.0488139]
3 [-0.0522653] [0.04501146]
4 [-0.048194] [0.04150522]
5 [-0.04443985] [0.0382721]
6 [-0.04097813] [0.03529083]
7 [-0.03778607] [0.03254179]
8 [-0.03484266] [0.03000689]
9 [-0.03212854] [0.02766946]
10 [-0.02962583] [0.0255141]
11 [-0.02731808] [0.02352663]
12 [-0.02519009] [0.02169399]
13 [-0.02322786] [0.0200041]
14 [-0.02141849] [0.01844584]
15 [-0.01975006] [0.01700897]
16 [-0.0182116] [0.01568403]
17 [-0.01679297] [0.0144623]
18 [-0.01548486] [0.01333573]
19 [-0.01427864] [0.01229692]
20 [-0.01316638] [0.01133903]
21 [-0.01214076] [0.01045576]
22 [-0.01119504] [0.00964129]
23 [-0.01032298] [0.00889027]
24 [-0.00951885] [0.00819774]
25 [-0.00877737] [0.00755917]
26 [-0.00809364] [0.00697033]
27 [-0.00746317] [0.00642737]
28 [-0.00688182] [0.0059267]
29 [-0.00634575] [0.00546503]
Eigenvalues of Hessian Matrix:[0.30043041 4.28093636]
0 [-13.544421] [-15.11052859]
1 [-0.26692247] [0.23040825]
2 [-0.2481902] [0.2142385]
3 [-0.23077255] [0.19920353]
4 [-0.21457724] [0.18522369]
5 [-0.19951849] [0.17222494]
6 [-0.18551655] [0.16013842]
7 [-0.17249725] [0.14890012]
8 [-0.16039162] [0.13845051]
9 [-0.14913555] [0.12873424]
10 [-0.13866942] [0.11969984]
11 [-0.12893778] [0.11129947]
12 [-0.1198891] [0.10348862]
13 [-0.11147544] [0.09622593]
14 [-0.10365224] [0.08947292]
15 [-0.09637807] [0.08319383]
16 [-0.08961438] [0.0773554]
17 [-0.08332537] [0.0719267]
18 [-0.0774777] [0.06687898]
19 [-0.07204042] [0.0621855]
20 [-0.06698472] [0.0578214]
21 [-0.06228382] [0.05376358]
22 [-0.05791283] [0.04999052]
23 [-0.05384858] [0.04648225]
24 [-0.05006956] [0.04322019]
25 [-0.04655574] [0.04018705]
26 [-0.04328852] [0.03736678]
27 [-0.04025059] [0.03474443]
28 [-0.03742586] [0.03230611]
29 [-0.03479936] [0.03003891]
theta from own gd
[[3.98232596]
[3.01522108]]
0 [-0.00585143] [0.00503932]
1 [-0.00539563] [0.00464677]
2 [-0.00483858] [0.00416704]
3 [-0.00429456] [0.00369852]
4 [-0.00379682] [0.00326986]
5 [-0.00335174] [0.00288656]
6 [-0.00295713] [0.00254671]
7 [-0.00260839] [0.00224638]
8 [-0.00230059] [0.00198129]
9 [-0.00202904] [0.00174743]
10 [-0.00178952] [0.00154115]
11 [-0.00157826] [0.00135922]
12 [-0.00139195] [0.00119876]
13 [-0.00122762] [0.00105724]
14 [-0.0010827] [0.00093243]
15 [-0.00095488] [0.00082235]
16 [-0.00084215] [0.00072527]
17 [-0.00074274] [0.00063965]
18 [-0.00065505] [0.00056414]
19 [-0.00057772] [0.00049754]
20 [-0.00050952] [0.0004388]
21 [-0.00044937] [0.000387]
22 [-0.00039632] [0.00034132]
23 [-0.00034953] [0.00030102]
24 [-0.00030827] [0.00026549]
25 [-0.00027188] [0.00023414]
26 [-0.00023978] [0.0002065]
27 [-0.00021147] [0.00018212]
28 [-0.00018651] [0.00016062]
29 [-0.00016449] [0.00014166]
[[3.89229722]
[3.09296935]]
0 [-0.03235719] [0.02793082]
1 [-0.03008641] [0.02597067]
2 [-0.02729375] [0.02356004]
3 [-0.02454051] [0.02118344]
4 [-0.02199232] [0.01898383]
5 [-0.01968447] [0.01699169]
6 [-0.01761069] [0.01520159]
7 [-0.01575266] [0.01359774]
8 [-0.01408975] [0.01216231]
9 [-0.01260207] [0.01087815]
10 [-0.01127138] [0.00972948]
11 [-0.01008116] [0.00870208]
12 [-0.00901661] [0.00778316]
13 [-0.00806447] [0.00696127]
14 [-0.00721287] [0.00622617]
15 [-0.00645121] [0.0055687]
16 [-0.00576997] [0.00498065]
17 [-0.00516067] [0.0044547]
18 [-0.00461571] [0.00398429]
19 [-0.0041283] [0.00356356]
20 [-0.00369236] [0.00318725]
21 [-0.00330245] [0.00285068]
22 [-0.00295372] [0.00254966]
23 [-0.00264181] [0.00228042]
24 [-0.00236284] [0.00203961]
25 [-0.00211332] [0.00182423]
26 [-0.00189016] [0.00163159]
27 [-0.00169056] [0.0014593]
28 [-0.00151204] [0.0013052]
29 [-0.00135237] [0.00116737]
theta from own gd wth momentum
[[3.99956181]
[3.00037737]]
[[3.9959739 ]
[3.00347534]]
</pre></div>
</div>
</div>
@@ -1104,17 +1121,17 @@ theta from own gd wth momentum
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
[[3.95845431]
[3.1424112 ]]
Eigenvalues of Hessian Matrix:[0.31758645 4.42644801]
0 [-17.28364423] [-20.62918713]
1 [-1.11891833e-14] [-3.34599467e-15]
2 [4.62954328e-16] [6.26536626e-16]
3 [-6.85866294e-16] [-8.50258788e-16]
4 [4.62954328e-16] [6.26536626e-16]
[[3.96414331]
[3.22481166]]
Eigenvalues of Hessian Matrix:[0.26674792 4.38123077]
0 [-15.60151468] [-17.64192473]
1 [-1.66342634e-14] [-1.21941484e-14]
2 [-6.41847686e-17] [1.63371136e-16]
3 [-6.76542156e-17] [-4.78340902e-17]
4 [-6.76542156e-17] [-4.78340902e-17]
beta from own Newton code
[[3.95845431]
[3.1424112 ]]
[[3.96414331]
[3.22481166]]
</pre></div>
</div>
</div>
@@ -1203,20 +1220,20 @@ beta from own Newton code
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
[[4.21392756]
[2.76329289]]
Eigenvalues of Hessian Matrix:[0.24999088 4.37057274]
[[3.84668873]
[3.21776599]]
Eigenvalues of Hessian Matrix:[0.28766899 4.2084894 ]
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own gd
[[4.21392756]
[2.76329289]]
[[3.84668873]
[3.21776599]]
</pre></div>
</div>
<img alt="_images/exercisesweek41_22_2.png" src="_images/exercisesweek41_22_2.png" />
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own sdg
[[4.15847501]
[2.79503363]]
[[3.86757762]
[3.17214797]]
</pre></div>
</div>
</div>
@@ -1298,19 +1315,15 @@ Eigenvalues of Hessian Matrix:[0.24999088 4.37057274]
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
[[4.02970225]
[3.04000457]]
Eigenvalues of Hessian Matrix:[0.28225179 4.44767398]
[[3.90140097]
[3.0552878 ]]
Eigenvalues of Hessian Matrix:[0.32683063 4.01722503]
theta from own gd
[[4.02930753]
[3.04033524]]
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own sdg with momentum
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[4.0292555 ]
[3.02413786]]
[[3.90137221]
[3.055314 ]]
theta from own sdg with momentum
[[3.83824223]
[3.10556487]]
</pre></div>
</div>
</div>
@@ -1385,9 +1398,9 @@ theta from own gd
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own AdaGrad
[[1.99997644]
[3.00011577]
[3.99989296]]
[[2.00003645]
[2.99977853]
[4.00021916]]
</pre></div>
</div>
</div>
@@ -1469,9 +1482,9 @@ theta from own gd
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own RMSprop
[[2.00211924]
[3.00515889]
[4.01229102]]
[[1.99985591]
[3.00049636]
[3.99943837]]
</pre></div>
</div>
</div>
@@ -1557,9 +1570,9 @@ theta from own gd
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own ADAM
[[2.00013955]
[2.99942911]
[4.00048158]]
[[2.00008335]
[2.99969576]
[4.00033679]]
</pre></div>
</div>
</div>
@@ -1632,7 +1645,7 @@ It provides composable transformations of Python+NumPy programs: differentiate,
return asarray(x, dtype=self.dtype)
</pre></div>
</div>
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x124b30190&gt;]
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x126431130&gt;]
</pre></div>
</div>
<img alt="_images/exercisesweek41_39_2.png" src="_images/exercisesweek41_39_2.png" />
@@ -1667,7 +1680,7 @@ It provides composable transformations of Python+NumPy programs: differentiate,
</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.collections.PathCollection at 0x124b96d60&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.collections.PathCollection at 0x117edb760&gt;
</pre></div>
</div>
<img alt="_images/exercisesweek41_41_1.png" src="_images/exercisesweek41_41_1.png" />