This commit is contained in:
Morten Hjorth-Jensen
2024-09-22 21:21:59 +02:00
parent 0a6ba7c08d
commit 80f0f2ffab
102 changed files with 18315 additions and 2027 deletions
+39 -29
View File
@@ -298,6 +298,16 @@ const thebe_selector_output = ".output, .cell_output"
Week 38: Logistic Regression and Optimization
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="exercisesweek39.html">
Exercises week 39
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="week39.html">
Week 39: Optimization and Gradient Methods
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
@@ -613,8 +623,8 @@ matrices and vectors.</p>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[-0.29015871 0.69417174 -1.07998756 0.34332677 0.19547923 -1.09755017
0.86197958 -0.15546887 0.14369927 1.96251859]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[ 0.69465386 1.75956617 -0.23303727 -0.53125507 1.34598722 -1.09928714
1.37013105 0.79898903 -0.23663482 0.99427512]
</pre></div>
</div>
</div>
@@ -835,26 +845,26 @@ as (recall that we user lowercase letters for vectors and uppercase letters for
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[0.08233627 0.43727575 0.01759442 0.01179415 0.34483937 0.32733949
0.71332117 0.20347912 0.57521514 0.56042437]
[0.64909048 0.55179339 0.13847167 0.04224929 0.89540936 0.5142856
0.85871255 0.75080943 0.34026086 0.50850373]
[0.03239393 0.87884833 0.41310208 0.82418008 0.01014331 0.24284399
0.93668828 0.79247398 0.48062913 0.77803692]
[0.73068535 0.47910545 0.95715036 0.11844773 0.76686148 0.31453949
0.6029291 0.5443909 0.29398019 0.96585824]
[0.0179826 0.51643579 0.53723188 0.03844073 0.25989189 0.20834188
0.98619989 0.40833375 0.52876551 0.76612827]
[0.44830934 0.94099173 0.07123177 0.96305058 0.11596834 0.69756791
0.60664448 0.89457785 0.86016288 0.33615742]
[0.35243372 0.77465911 0.37532078 0.38399622 0.20728198 0.1108407
0.83020679 0.48170743 0.99003341 0.99956033]
[0.82832579 0.42553096 0.02355756 0.28542801 0.96894842 0.70711022
0.8825782 0.04072235 0.24369936 0.79622905]
[0.60762863 0.21699817 0.20218457 0.63071772 0.02358547 0.62886648
0.44286735 0.78745927 0.30982436 0.76277254]
[0.52173381 0.9495484 0.47433659 0.73203674 0.95226607 0.40072098
0.35098705 0.46544987 0.66456459 0.25512598]]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[[0.81947005 0.93619369 0.37449168 0.91933003 0.76855921 0.41820116
0.96853248 0.60375434 0.96015381 0.30269539]
[0.46086448 0.16777789 0.9930742 0.10837392 0.69089532 0.94221383
0.53629564 0.50327198 0.33734605 0.04757138]
[0.51069279 0.12363332 0.79171202 0.16791183 0.62617788 0.9288904
0.85112594 0.86519139 0.61192712 0.90842732]
[0.82551764 0.67524588 0.02175561 0.1118933 0.42575338 0.45731379
0.61069681 0.40184681 0.18702469 0.71838601]
[0.68655456 0.11747908 0.28253033 0.4591127 0.68072161 0.59372982
0.95343966 0.24780663 0.98740373 0.06808421]
[0.99512017 0.14828178 0.02354386 0.90860768 0.891715 0.39039235
0.48151166 0.43563433 0.52657934 0.73176319]
[0.77030637 0.00676256 0.37454707 0.5076963 0.51937727 0.46065811
0.65917558 0.72962885 0.99370678 0.92341148]
[0.16292908 0.17214545 0.44995924 0.20367355 0.64885265 0.34225662
0.4215795 0.27933134 0.02552966 0.62908496]
[0.8084934 0.51364117 0.4937346 0.05296475 0.69247718 0.56783103
0.85276538 0.52635761 0.96461948 0.67374815]
[0.02137508 0.03177331 0.78186404 0.33096549 0.8423144 0.07745579
0.4619526 0.61414743 0.38460453 0.51928402]]
</pre></div>
</div>
</div>
@@ -914,13 +924,13 @@ 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.0018310257999764163
4.092608577084595
0.31555734196707536
[[ 0.78671736 2.38337498 2.04657426]
[ 2.38337498 8.33235647 6.05002471]
[ 2.04657426 6.05002471 10.13152828]]
[15.98413606 0.08227668 3.18418938]
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.07218473624441492
4.346000154268618
0.09048717285916912
[[ 1.0974119 3.2131067 3.36880327]
[ 3.2131067 10.51564682 9.75138064]
[ 3.36880327 9.75138064 17.26527089]]
[25.09487358 0.09070064 3.6927554 ]
</pre></div>
</div>
</div>