This commit is contained in:
Morten Hjorth-Jensen
2023-10-15 21:55:49 +02:00
parent cb5ab447ad
commit edf33b439c
171 changed files with 18722 additions and 1691 deletions
+83 -61
View File
@@ -313,6 +313,26 @@ const thebe_selector_output = ".output, .cell_output"
Week 40: Gradient descent methods (continued) and start Neural networks
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="exercisesweek41.html">
Exercises week 41
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="week41.html">
Week 41 Neural networks and constructing a neural network code
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="exercisesweek42.html">
Exercises week 42
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="week42.html">
Week 42 Constructing a Neural Network code with introduction to Tensor flow
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
@@ -325,6 +345,11 @@ const thebe_selector_output = ".output, .cell_output"
Project 1 on Machine Learning, deadline October 9 (midnight), 2023
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="project2.html">
Project 2 on Machine Learning, deadline November 13 (Midnight)
</a>
</li>
</ul>
</div>
@@ -1290,10 +1315,10 @@ covariance matrix through the <strong>np.linalg.eig()</strong> function.</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>-0.033790755027115954
3.888577549915147
[[ 1.2697447 3.97644118]
[ 3.97644118 13.38465596]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.12765651865754318
4.348676117830458
[[0.98073929 2.88442538]
[2.88442538 9.24128917]]
</pre></div>
</div>
</div>
@@ -1330,10 +1355,10 @@ a more brute force way. Here we scale the mean values for each column of the des
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.08238863600759742
1.795225339396409
[[1. 0.64391062]
[0.64391062 1. ]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.08652153831327969
1.7893215781870513
[[1. 0.70344416]
[0.70344416 1. ]]
</pre></div>
</div>
</div>
@@ -1363,30 +1388,30 @@ this matrix we easily see that it is a positive definite matrix.</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[ 1.29135778 4.3399612 ]
[ 0.08815506 -1.48140137]
[ 0.34149655 1.18571316]
[-1.00375475 -2.69226802]
[ 0.42198678 2.56858701]
[ 0.53278871 2.8969113 ]
[-1.38020451 -4.26263837]
[-0.64969451 -2.00778523]
[-0.32632463 -1.7413913 ]
[ 0.68419351 1.19431161]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[ 1.71727268 5.22388434]
[ 0.31027702 0.17469167]
[-0.26149831 -0.93082933]
[ 0.04107874 1.47244548]
[-2.10812381 -5.28818554]
[-1.62910047 -4.07706814]
[ 0.92136836 2.27309401]
[-0.3175938 -1.42457498]
[ 0.68037392 0.16481217]
[ 0.64594566 2.41173033]]
0 1
0 1.291358 4.339961
1 0.088155 -1.481401
2 0.341497 1.185713
3 -1.003755 -2.692268
4 0.421987 2.568587
5 0.532789 2.896911
6 -1.380205 -4.262638
7 -0.649695 -2.007785
8 -0.326325 -1.741391
9 0.684194 1.194312
0 1.717273 5.223884
1 0.310277 0.174692
2 -0.261498 -0.930829
3 0.041079 1.472445
4 -2.108124 -5.288186
5 -1.629100 -4.077068
6 0.921368 2.273094
7 -0.317594 -1.424575
8 0.680374 0.164812
9 0.645946 2.411730
0 1
0 1.000000 0.943439
1 0.943439 1.000000
0 1.000000 0.962653
1 0.962653 1.000000
</pre></div>
</div>
</div>
@@ -1443,40 +1468,37 @@ this matrix we easily see that it is a positive definite matrix.</p>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 0 1 2 3 4 5 6 7 \
0 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
1 0.0 0.089710 0.084075 0.088697 0.086518 0.084247 0.079455 0.077756
2 0.0 0.084075 0.079226 0.082189 0.080406 0.078545 0.073008 0.071611
3 0.0 0.088697 0.082189 0.093408 0.090365 0.087247 0.087250 0.084843
4 0.0 0.086518 0.080406 0.090365 0.087603 0.084764 0.083853 0.081680
5 0.0 0.084247 0.078545 0.087247 0.084764 0.082205 0.080411 0.078467
6 0.0 0.079455 0.073008 0.087250 0.083853 0.080411 0.083988 0.081246
7 0.0 0.077756 0.071611 0.084843 0.081680 0.078467 0.081246 0.078707
8 0.0 0.076125 0.070275 0.082517 0.079581 0.076592 0.078593 0.076249
9 0.0 0.074545 0.068987 0.080256 0.077542 0.074772 0.076012 0.073858
10 0.0 0.070597 0.064412 0.079882 0.076354 0.072805 0.078656 0.075758
11 0.0 0.068974 0.063055 0.077650 0.074330 0.070986 0.076136 0.073422
12 0.0 0.067437 0.061775 0.075523 0.072404 0.069257 0.073728 0.071191
13 0.0 0.065982 0.060567 0.073494 0.070569 0.067611 0.071423 0.069055
14 0.0 0.064602 0.059427 0.071554 0.068816 0.066042 0.069213 0.067009
1 0.0 0.082246 0.081621 0.082225 0.081617 0.081120 0.073421 0.072973
2 0.0 0.081621 0.081679 0.081960 0.081804 0.081742 0.073498 0.073387
3 0.0 0.082225 0.081960 0.087271 0.086900 0.086636 0.081057 0.080755
4 0.0 0.081617 0.081804 0.086900 0.086868 0.086932 0.080935 0.080903
5 0.0 0.081120 0.081742 0.086636 0.086932 0.087311 0.080906 0.081136
6 0.0 0.073421 0.073498 0.081057 0.080935 0.080906 0.077455 0.077330
7 0.0 0.072973 0.073387 0.080755 0.080903 0.081136 0.077330 0.077429
8 0.0 0.072637 0.073376 0.080571 0.080980 0.081466 0.077313 0.077630
9 0.0 0.072410 0.073465 0.080502 0.081164 0.081896 0.077403 0.077931
10 0.0 0.064640 0.064948 0.073406 0.073471 0.073618 0.071662 0.071685
11 0.0 0.064320 0.064896 0.073187 0.073476 0.073840 0.071579 0.071792
12 0.0 0.064101 0.064938 0.073080 0.073586 0.074161 0.071601 0.072000
13 0.0 0.063980 0.065069 0.073079 0.073797 0.074577 0.071726 0.072305
14 0.0 0.063953 0.065289 0.073184 0.074108 0.075089 0.071951 0.072707
8 9 10 11 12 13 14
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
1 0.076125 0.074545 0.070597 0.068974 0.067437 0.065982 0.064602
2 0.070275 0.068987 0.064412 0.063055 0.061775 0.060567 0.059427
3 0.082517 0.080256 0.079882 0.077650 0.075523 0.073494 0.071554
4 0.079581 0.077542 0.076354 0.074330 0.072404 0.070569 0.068816
5 0.076592 0.074772 0.072805 0.070986 0.069257 0.067611 0.066042
6 0.078593 0.076012 0.078656 0.076136 0.073728 0.071423 0.069213
7 0.076249 0.073858 0.075758 0.073422 0.071191 0.069055 0.067009
8 0.073980 0.071773 0.072953 0.070795 0.068734 0.066762 0.064874
9 0.071773 0.069746 0.070228 0.068241 0.066344 0.064532 0.062797
10 0.072953 0.070228 0.074969 0.072310 0.069766 0.067328 0.064987
11 0.070795 0.068241 0.072310 0.069822 0.067440 0.065158 0.062967
12 0.068734 0.066344 0.069766 0.067440 0.065214 0.063081 0.061034
13 0.066762 0.064532 0.067328 0.065158 0.063081 0.061092 0.059182
14 0.064874 0.062797 0.064987 0.062967 0.061034 0.059182 0.057406
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>
1 0.072637 0.072410 0.064640 0.064320 0.064101 0.063980 0.063953
2 0.073376 0.073465 0.064948 0.064896 0.064938 0.065069 0.065289
3 0.080571 0.080502 0.073406 0.073187 0.073080 0.073079 0.073184
4 0.080980 0.081164 0.073471 0.073476 0.073586 0.073797 0.074108
5 0.081466 0.081896 0.073618 0.073840 0.074161 0.074577 0.075089
6 0.077313 0.077403 0.071662 0.071579 0.071601 0.071726 0.071951
7 0.077630 0.077931 0.071685 0.071792 0.072000 0.072305 0.072707
8 0.078041 0.078548 0.071805 0.072098 0.072486 0.072967 0.073541
9 0.078548 0.079255 0.072022 0.072495 0.073059 0.073712 0.074455
10 0.071805 0.072022 0.067420 0.067457 0.067591 0.067820 0.068141
11 0.072098 0.072495 0.067457 0.067660 0.067955 0.068340 0.068815
12 0.072486 0.073059 0.067591 0.067955 0.068407 0.068945 0.069570
13 0.072967 0.073712 0.067820 0.068340 0.068945 0.069634 0.070406
14 0.073541 0.074455 0.068141 0.068815 0.069570 0.070406 0.071323
</pre></div>
</div>
</div>