Skip to content

Commit ca82d06

Browse files
committed
typo in lab02
1 parent ada49d2 commit ca82d06

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎resources/labs/lab02/index.md‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ In each of the parts below, determine the value of the quantity provided. By "th
892892
</tr>
893893
<tr>
894894
<td style="text-align: right;">(i)</td>
895-
<td style="text-align: left;"><span class="math-inline">\(h&#95;0^{\ast}\)</span></td>
895+
<td style="text-align: left;"><span class="math-inline">\(w&#95;0^{\ast}\)</span></td>
896896
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
897897
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
898898
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
@@ -903,7 +903,7 @@ In each of the parts below, determine the value of the quantity provided. By "th
903903
</tr>
904904
<tr>
905905
<td style="text-align: right;">(ii)</td>
906-
<td style="text-align: left;"><span class="math-inline">\(h&#95;1^{\ast}\)</span></td>
906+
<td style="text-align: left;"><span class="math-inline">\(w&#95;1^{\ast}\)</span></td>
907907
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
908908
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
909909
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
@@ -914,7 +914,7 @@ In each of the parts below, determine the value of the quantity provided. By "th
914914
</tr>
915915
<tr>
916916
<td style="text-align: right;">(iii)</td>
917-
<td style="text-align: left;"><span class="math-inline">\(R&#95;1(h&#95;1^{\ast})\)</span></td>
917+
<td style="text-align: left;"><span class="math-inline">\(R&#95;1(w&#95;1^{\ast})\)</span></td>
918918
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
919919
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
920920
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
@@ -925,7 +925,7 @@ In each of the parts below, determine the value of the quantity provided. By "th
925925
</tr>
926926
<tr>
927927
<td style="text-align: right;">(iv)</td>
928-
<td style="text-align: left;"><span class="math-inline">\(h&#95;2^{\ast}\)</span></td>
928+
<td style="text-align: left;"><span class="math-inline">\(w&#95;2^{\ast}\)</span></td>
929929
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
930930
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
931931
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
@@ -936,7 +936,7 @@ In each of the parts below, determine the value of the quantity provided. By "th
936936
</tr>
937937
<tr>
938938
<td style="text-align: right;">(v)</td>
939-
<td style="text-align: left;"><span class="math-inline">\(R&#95;2(h&#95;2^{\ast})\)</span></td>
939+
<td style="text-align: left;"><span class="math-inline">\(R&#95;2(w&#95;2^{\ast})\)</span></td>
940940
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
941941
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
942942
<td style="text-align: left;"><span class="math-inline">\(\bigcirc\)</span></td>
@@ -953,32 +953,32 @@ In each of the parts below, determine the value of the quantity provided. By "th
953953
<ul class="assignment-list" markdown="1" data-item-count="5">
954954
<li markdown="1">
955955

956-
**(i)** <span class="math-inline">\\(h&#95;0^{\ast}\\)</span> is none of the these. The original intention was to have <span class="math-inline">\\(R&#95;0\\)</span> be 0-1 loss, in which case <span class="math-inline">\\(h&#95;0^{\ast}\\)</span> would be the mode.
956+
**(i)** <span class="math-inline">\\(w&#95;0^{\ast}\\)</span> is none of the these. The original intention was to have <span class="math-inline">\\(R&#95;0\\)</span> be 0-1 loss, in which case <span class="math-inline">\\(w&#95;0^{\ast}\\)</span> would be the mode.
957957

958958
</li>
959959
<li markdown="1">
960960

961-
**(ii)** <span class="math-inline">\\(h&#95;1^{\ast}\\)</span> is the median of the data, since <span class="math-inline">\\(R&#95;1(w)= \displaystyle \frac{1}{n} \sum&#95;{i=1}^{n}|y&#95;i-w|\\)</span>
961+
**(ii)** <span class="math-inline">\\(w&#95;1^{\ast}\\)</span> is the median of the data, since <span class="math-inline">\\(R&#95;1(w)= \displaystyle \frac{1}{n} \sum&#95;{i=1}^{n}|y&#95;i-w|\\)</span>
962962

963963
</li>
964964
<li markdown="1">
965965

966-
**(iii)** <span class="math-inline">\\(R&#95;1(h&#95;1^{\ast})\\)</span> is the minimum mean absolute error, which is none of these.
966+
**(iii)** <span class="math-inline">\\(R&#95;1(w&#95;1^{\ast})\\)</span> is the minimum mean absolute error, which is none of these.
967967

968968
</li>
969969
<li markdown="1">
970970

971-
**(iv)** <span class="math-inline">\\(h&#95;2^{\ast}\\)</span> is the mean of the data, since <span class="math-inline">\\(R&#95;2(w)= \displaystyle \frac{1}{n} \sum&#95;{i=1}^{n}|y&#95;i-w|^2\\)</span> is equivalent to mean squared error.
971+
**(iv)** <span class="math-inline">\\(w&#95;2^{\ast}\\)</span> is the mean of the data, since <span class="math-inline">\\(R&#95;2(w)= \displaystyle \frac{1}{n} \sum&#95;{i=1}^{n}|y&#95;i-w|^2\\)</span> is equivalent to mean squared error.
972972

973973
</li>
974974
<li markdown="1">
975975

976-
**(v)** <span class="math-inline">\\(R&#95;2(h&#95;2^{\ast})\\)</span> is the variance of the data, or the minimum mean squared error, shown below:
976+
**(v)** <span class="math-inline">\\(R&#95;2(w&#95;2^{\ast})\\)</span> is the variance of the data, or the minimum mean squared error, shown below:
977977

978978
<div class="math-display">
979979
$$
980980
\begin{align*}
981-
R_2(h_2^*)&=\displaystyle \frac{1}{n} \sum_{i=1}^{n}|y_i-h_2^*|^2
981+
R_2(w_2^*)&=\displaystyle \frac{1}{n} \sum_{i=1}^{n}|y_i-w_2^*|^2
982982
\\\\&=\displaystyle \frac{1}{n} \sum_{i=1}^{n}|y_i-\bar y|^2
983983
\\\\&=\displaystyle \frac{1}{n} \sum_{i=1}^{n}(y_i-\bar y)^2 = \sigma_y^2
984984
\end{align*}
@@ -995,21 +995,21 @@ $$
995995
<div class="assignment-part" markdown="1">
996996
<div class="assignment-part-label">b)</div>
997997
<div class="assignment-part-content" markdown="1">
998-
Now, suppose we want to find the optimal constant prediction, <span class="math-inline">\\(h&#95;\text{U}^{\ast}\\)</span>, using the "Ulta" loss function, defined below:
998+
Now, suppose we want to find the optimal constant prediction, <span class="math-inline">\\(w&#95;\text{U}^{\ast}\\)</span>, using the "Ulta" loss function, defined below:
999999

10001000
<div class="math-display">
10011001
$$
10021002
L_\text{U}(y_i, w) = y_i(y_i-w)^2
10031003
$$
10041004
</div>
10051005

1006-
To find <span class="math-inline">\\(h&#95;\text{U}^{\ast}\\)</span>, we minimize <span class="math-inline">\\(R&#95;\text{U}(w)\\)</span>, the average Ulta loss. How does <span class="math-inline">\\(h&#95;\text{U}^{\ast}\\)</span> compare to the mean of the data, <span class="math-inline">\\(M\\)</span>?
1006+
To find <span class="math-inline">\\(w&#95;\text{U}^{\ast}\\)</span>, we minimize <span class="math-inline">\\(R&#95;\text{U}(w)\\)</span>, the average Ulta loss. How does <span class="math-inline">\\(w&#95;\text{U}^{\ast}\\)</span> compare to the mean of the data, <span class="math-inline">\\(M\\)</span>?
10071007

1008-
<div class="mc-options"><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} &gt; M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} \geq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} = M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} \leq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} &lt; M\)</span></span></div>
1008+
<div class="mc-options"><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} &gt; M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} \geq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} = M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} \leq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} &lt; M\)</span></span></div>
10091009

10101010
<details markdown="1"><summary>Solution</summary>
10111011

1012-
<div class="mc-options"><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} &gt; M\)</span></span><span class="mc-option"><span class="mc-bubble mc-correct" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} \geq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} = M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} \leq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(h&#95;\text{U}^{\ast} &lt; M\)</span></span></div>
1012+
<div class="mc-options"><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} &gt; M\)</span></span><span class="mc-option"><span class="mc-bubble mc-correct" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} \geq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} = M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} \leq M\)</span></span><span class="mc-option"><span class="mc-bubble" aria-hidden="true"></span> <span class="math-inline">\(w&#95;\text{U}^{\ast} &lt; M\)</span></span></div>
10131013

10141014
Minimizing the average Ulta loss means minimizing the empirical risk:
10151015

@@ -1019,7 +1019,7 @@ R_\text{U}(w)=\displaystyle \frac{1}{n} \sum_{i=1}^{n}y_i(y_i-w)^2
10191019
$$
10201020
</div>
10211021

1022-
The minimizer is <span class="math-inline">\\(h&#95;\text{U}^{\ast} = \frac{\sum&#95;{i=1}^n y&#95;i^2}{\sum&#95;{i=1}^n y&#95;i}\\)</span>. Since <span class="math-inline">\\(M &gt; 0\\)</span>, we have <span class="math-inline">\\(h&#95;\text{U}^{\ast} - M = \frac{\frac{1}{n}\sum&#95;{i=1}^n (y&#95;i-M)^2}{M} \geq 0\\)</span>. Thus, <span class="math-inline">\\(h&#95;\text{U}^{\ast} \geq M\\)</span>, with equality exactly when all the <span class="math-inline">\\(y&#95;i\\)</span> values are equal.
1022+
The minimizer is <span class="math-inline">\\(w&#95;\text{U}^{\ast} = \frac{\sum&#95;{i=1}^n y&#95;i^2}{\sum&#95;{i=1}^n y&#95;i}\\)</span>. Since <span class="math-inline">\\(M &gt; 0\\)</span>, we have <span class="math-inline">\\(w&#95;\text{U}^{\ast} - M = \frac{\frac{1}{n}\sum&#95;{i=1}^n (y&#95;i-M)^2}{M} \geq 0\\)</span>. Thus, <span class="math-inline">\\(w&#95;\text{U}^{\ast} \geq M\\)</span>, with equality exactly when all the <span class="math-inline">\\(y&#95;i\\)</span> values are equal.
10231023
</details>
10241024

10251025
</div>
-24 Bytes
Binary file not shown.

‎resources/labs/lab02/lab02.pdf‎

-13 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)