update lecture notes
This commit is contained in:
@@ -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">
|
||||
@@ -1684,7 +1689,7 @@ theorem.</p>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Bootstrap Statistics :
|
||||
original bias std. error
|
||||
100.052 15.0095 100.051 0.150055
|
||||
99.9722 14.9105 99.9697 0.149904
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1926,9 +1931,7 @@ Error: 0.05227921801205686
|
||||
Bias^2: 0.0481872773043029
|
||||
Var: 0.004091940707753939
|
||||
0.05227921801205686 >= 0.0481872773043029 + 0.004091940707753939 = 0.052279218012056844
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Polynomial degree: 6
|
||||
Polynomial degree: 6
|
||||
Error: 0.037813671417389005
|
||||
Bias^2: 0.033657685071527665
|
||||
Var: 0.00415598634586135
|
||||
@@ -1960,21 +1963,21 @@ Error: 0.07160048164233104
|
||||
Bias^2: 0.014436800088904942
|
||||
Var: 0.05716368155342608
|
||||
0.07160048164233104 >= 0.014436800088904942 + 0.05716368155342608 = 0.07160048164233102
|
||||
Polynomial degree: 12
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Polynomial degree: 12
|
||||
Error: 0.11547777218872497
|
||||
Bias^2: 0.01628578269596628
|
||||
Var: 0.09919198949275869
|
||||
0.11547777218872497 >= 0.01628578269596628 + 0.09919198949275869 = 0.11547777218872497
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Polynomial degree: 13
|
||||
Polynomial degree: 13
|
||||
Error: 0.22842468702219465
|
||||
Bias^2: 0.01975416527185249
|
||||
Var: 0.20867052175034223
|
||||
0.22842468702219465 >= 0.01975416527185249 + 0.20867052175034223 = 0.2284246870221947
|
||||
</pre></div>
|
||||
</div>
|
||||
<img alt="_images/week37_139_5.png" src="_images/week37_139_5.png" />
|
||||
<img alt="_images/week37_139_4.png" src="_images/week37_139_4.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2311,12 +2314,12 @@ Mean squared error on test data: 129963.83146596
|
||||
Degree of polynomial: 3
|
||||
Mean squared error on training data: 9054.61775176
|
||||
Mean squared error on test data: 10572.87627342
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 4
|
||||
Degree of polynomial: 4
|
||||
Mean squared error on training data: 302.15313054
|
||||
Mean squared error on test data: 433.26292364
|
||||
Degree of polynomial: 5
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 5
|
||||
Mean squared error on training data: 3.64316192
|
||||
Mean squared error on test data: 7.23528337
|
||||
Degree of polynomial: 6
|
||||
@@ -2325,12 +2328,12 @@ Mean squared error on test data: 10.50427787
|
||||
Degree of polynomial: 7
|
||||
Mean squared error on training data: 0.47313680
|
||||
Mean squared error on test data: 1.53738247
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 8
|
||||
Degree of polynomial: 8
|
||||
Mean squared error on training data: 0.04926746
|
||||
Mean squared error on test data: 0.14629156
|
||||
Degree of polynomial: 9
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 9
|
||||
Mean squared error on training data: 0.02546675
|
||||
Mean squared error on test data: 0.11202337
|
||||
Degree of polynomial: 10
|
||||
@@ -2339,12 +2342,12 @@ Mean squared error on test data: 0.22467274
|
||||
Degree of polynomial: 11
|
||||
Mean squared error on training data: 0.01594452
|
||||
Mean squared error on test data: 1.07641937
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 12
|
||||
Degree of polynomial: 12
|
||||
Mean squared error on training data: 0.00805074
|
||||
Mean squared error on test data: 0.04295757
|
||||
Degree of polynomial: 13
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 13
|
||||
Mean squared error on training data: 0.00781918
|
||||
Mean squared error on test data: 0.56965674
|
||||
Degree of polynomial: 14
|
||||
@@ -2353,12 +2356,12 @@ Mean squared error on test data: 0.28443039
|
||||
Degree of polynomial: 15
|
||||
Mean squared error on training data: 0.00420072
|
||||
Mean squared error on test data: 568.47051432
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 16
|
||||
Degree of polynomial: 16
|
||||
Mean squared error on training data: 0.00325450
|
||||
Mean squared error on test data: 48.97630233
|
||||
Degree of polynomial: 17
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 17
|
||||
Mean squared error on training data: 0.00242954
|
||||
Mean squared error on test data: 2.52780600
|
||||
Degree of polynomial: 18
|
||||
@@ -2367,12 +2370,12 @@ Mean squared error on test data: 429.25695398
|
||||
Degree of polynomial: 19
|
||||
Mean squared error on training data: 0.00154853
|
||||
Mean squared error on test data: 239.97065359
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 20
|
||||
Degree of polynomial: 20
|
||||
Mean squared error on training data: 0.00140846
|
||||
Mean squared error on test data: 1350.24493666
|
||||
Degree of polynomial: 21
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 21
|
||||
Mean squared error on training data: 0.00119688
|
||||
Mean squared error on test data: 1840.50530832
|
||||
Degree of polynomial: 22
|
||||
@@ -2381,12 +2384,12 @@ Mean squared error on test data: 1184.60929685
|
||||
Degree of polynomial: 23
|
||||
Mean squared error on training data: 0.00089193
|
||||
Mean squared error on test data: 3892.17483760
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 24
|
||||
Degree of polynomial: 24
|
||||
Mean squared error on training data: 0.00083355
|
||||
Mean squared error on test data: 1332.46736215
|
||||
Degree of polynomial: 25
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 25
|
||||
Mean squared error on training data: 0.00079904
|
||||
Mean squared error on test data: 7577.76690383
|
||||
Degree of polynomial: 26
|
||||
@@ -2395,19 +2398,19 @@ Mean squared error on test data: 1079.36895644
|
||||
Degree of polynomial: 27
|
||||
Mean squared error on training data: 0.00068091
|
||||
Mean squared error on test data: 3207.25343155
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 28
|
||||
Degree of polynomial: 28
|
||||
Mean squared error on training data: 0.00063362
|
||||
Mean squared error on test data: 674.79633065
|
||||
Degree of polynomial: 29
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Degree of polynomial: 29
|
||||
Mean squared error on training data: 0.00063866
|
||||
Mean squared error on test data: 3099.60342978
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_94293/626635268.py:73: RuntimeWarning: divide by zero encountered in log10
|
||||
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_20933/626635268.py:73: RuntimeWarning: divide by zero encountered in log10
|
||||
plt.plot(polynomial, np.log10(trainingerror), label='Training Error')
|
||||
/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_94293/626635268.py:74: RuntimeWarning: divide by zero encountered in log10
|
||||
/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_20933/626635268.py:74: RuntimeWarning: divide by zero encountered in log10
|
||||
plt.plot(polynomial, np.log10(testerror), label='Test Error')
|
||||
</pre></div>
|
||||
</div>
|
||||
@@ -2492,7 +2495,7 @@ Mean squared error on test data: 3099.60342978
|
||||
</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_94293/3817475779.py:63: RuntimeWarning: divide by zero encountered in log10
|
||||
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_20933/3817475779.py:63: RuntimeWarning: divide by zero encountered in log10
|
||||
plt.plot(polynomial, np.log10(estimated_mse_sklearn), label='Test Error')
|
||||
</pre></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user