cleaning up typos
This commit is contained in:
@@ -457,7 +457,7 @@ If we assume that every column of \( \boldsymbol{X} \) is centered, which we can
|
||||
the sum \( \sum_{i=0}^{n-1} X_{ij} \)
|
||||
can be rewritten as
|
||||
$$
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}\right) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
$$
|
||||
|
||||
resulting in
|
||||
@@ -476,7 +476,7 @@ $$
|
||||
\beta_0 = \frac{1}{n}\sum_{i=0}^{n-1} y_i = \overline{\boldsymbol{y}},
|
||||
$$
|
||||
|
||||
the average value of \( \boldsymbol{y] \).
|
||||
the average value of \( \boldsymbol{y} \).
|
||||
|
||||
<p>
|
||||
Replacing \( y_i \) with \( y_i - \beta_0 = y_i - \overline{\boldsymbol{y}} \) in the cost function will give us (in vector-matrix disguise)
|
||||
|
||||
@@ -443,7 +443,7 @@ y <span style="color: #666666">=</span> np<span style="color: #666666">.</span>e
|
||||
|
||||
Maxpolydegree <span style="color: #666666">=</span> <span style="color: #666666">20</span>
|
||||
X <span style="color: #666666">=</span> np<span style="color: #666666">.</span>zeros((n,Maxpolydegree))
|
||||
We include explicitely the intercpt column
|
||||
<span style="color: #408080; font-style: italic">#We include explicitely the intercept column</span>
|
||||
X[:,<span style="color: #666666">0</span>] <span style="color: #666666">=</span> <span style="color: #666666">1.0</span>
|
||||
|
||||
<span style="color: #008000; font-weight: bold">for</span> degree <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">range</span>(Maxpolydegree):
|
||||
|
||||
@@ -649,7 +649,7 @@ the sum \( \sum_{i=0}^{n-1} X_{ij} \)
|
||||
can be rewritten as
|
||||
<p> <br>
|
||||
$$
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}\right) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
$$
|
||||
<p> <br>
|
||||
|
||||
@@ -675,7 +675,7 @@ $$
|
||||
$$
|
||||
<p> <br>
|
||||
|
||||
the average value of \( \boldsymbol{y] \).
|
||||
the average value of \( \boldsymbol{y} \).
|
||||
|
||||
<p>
|
||||
Replacing \( y_i \) with \( y_i - \beta_0 = y_i - \overline{\boldsymbol{y}} \) in the cost function will give us (in vector-matrix disguise)
|
||||
@@ -725,7 +725,7 @@ y = np.exp(-x**<span style="color: #B452CD">2</span>) + <span style="color: #B45
|
||||
|
||||
Maxpolydegree = <span style="color: #B452CD">20</span>
|
||||
X = np.zeros((n,Maxpolydegree))
|
||||
We include explicitely the intercpt column
|
||||
<span style="color: #228B22">#We include explicitely the intercept column</span>
|
||||
X[:,<span style="color: #B452CD">0</span>] = <span style="color: #B452CD">1.0</span>
|
||||
|
||||
<span style="color: #8B008B; font-weight: bold">for</span> degree <span style="color: #8B008B">in</span> <span style="color: #658b00">range</span>(Maxpolydegree):
|
||||
|
||||
@@ -799,7 +799,7 @@ If we assume that every column of \( \boldsymbol{X} \) is centered, which we can
|
||||
the sum \( \sum_{i=0}^{n-1} X_{ij} \)
|
||||
can be rewritten as
|
||||
$$
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}\right) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
$$
|
||||
|
||||
resulting in
|
||||
@@ -818,7 +818,7 @@ $$
|
||||
\beta_0 = \frac{1}{n}\sum_{i=0}^{n-1} y_i = \overline{\boldsymbol{y}},
|
||||
$$
|
||||
|
||||
the average value of \( \boldsymbol{y] \).
|
||||
the average value of \( \boldsymbol{y} \).
|
||||
|
||||
<p>
|
||||
Replacing \( y_i \) with \( y_i - \beta_0 = y_i - \overline{\boldsymbol{y}} \) in the cost function will give us (in vector-matrix disguise)
|
||||
@@ -866,7 +866,7 @@ y = np.exp(-x**<span style="color: #B452CD">2</span>) + <span style="color: #B45
|
||||
|
||||
Maxpolydegree = <span style="color: #B452CD">20</span>
|
||||
X = np.zeros((n,Maxpolydegree))
|
||||
We include explicitely the intercpt column
|
||||
<span style="color: #228B22">#We include explicitely the intercept column</span>
|
||||
X[:,<span style="color: #B452CD">0</span>] = <span style="color: #B452CD">1.0</span>
|
||||
|
||||
<span style="color: #8B008B; font-weight: bold">for</span> degree <span style="color: #8B008B">in</span> <span style="color: #658b00">range</span>(Maxpolydegree):
|
||||
|
||||
@@ -804,7 +804,7 @@ If we assume that every column of \( \boldsymbol{X} \) is centered, which we can
|
||||
the sum \( \sum_{i=0}^{n-1} X_{ij} \)
|
||||
can be rewritten as
|
||||
$$
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}\right) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
$$
|
||||
|
||||
resulting in
|
||||
@@ -823,7 +823,7 @@ $$
|
||||
\beta_0 = \frac{1}{n}\sum_{i=0}^{n-1} y_i = \overline{\boldsymbol{y}},
|
||||
$$
|
||||
|
||||
the average value of \( \boldsymbol{y] \).
|
||||
the average value of \( \boldsymbol{y} \).
|
||||
|
||||
<p>
|
||||
Replacing \( y_i \) with \( y_i - \beta_0 = y_i - \overline{\boldsymbol{y}} \) in the cost function will give us (in vector-matrix disguise)
|
||||
@@ -871,7 +871,7 @@ y <span style="color: #666666">=</span> np<span style="color: #666666">.</span>e
|
||||
|
||||
Maxpolydegree <span style="color: #666666">=</span> <span style="color: #666666">20</span>
|
||||
X <span style="color: #666666">=</span> np<span style="color: #666666">.</span>zeros((n,Maxpolydegree))
|
||||
We include explicitely the intercpt column
|
||||
<span style="color: #408080; font-style: italic">#We include explicitely the intercept column</span>
|
||||
X[:,<span style="color: #666666">0</span>] <span style="color: #666666">=</span> <span style="color: #666666">1.0</span>
|
||||
|
||||
<span style="color: #008000; font-weight: bold">for</span> degree <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">range</span>(Maxpolydegree):
|
||||
|
||||
Binary file not shown.
@@ -628,7 +628,7 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\sum_{i=0}^{n-1} \\left(X_{ij} - \\frac{1}{n}\\sum_{i=0}^{n-1} X_{ij}) = \\sum_{i=0}^{n-1} X_{ij} - \\sum_{i=0}^{n-1} \\frac{1}{n} \\sum_{i=0}^{n-1}X_{ij},\n",
|
||||
"\\sum_{i=0}^{n-1} \\left(X_{ij} - \\frac{1}{n}\\sum_{i=0}^{n-1} X_{ij}\\right) = \\sum_{i=0}^{n-1} X_{ij} - \\sum_{i=0}^{n-1} \\frac{1}{n} \\sum_{i=0}^{n-1}X_{ij},\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
@@ -684,7 +684,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"the average value of $\\boldsymbol{y]$.\n",
|
||||
"the average value of $\\boldsymbol{y}$.\n",
|
||||
"\n",
|
||||
"Replacing $y_i$ with $y_i - \\beta_0 = y_i - \\overline{\\boldsymbol{y}}$ in the cost function will give us (in vector-matrix disguise)"
|
||||
]
|
||||
@@ -743,7 +743,7 @@
|
||||
"\n",
|
||||
"Maxpolydegree = 20\n",
|
||||
"X = np.zeros((n,Maxpolydegree))\n",
|
||||
"We include explicitely the intercpt column\n",
|
||||
"#We include explicitely the intercept column\n",
|
||||
"X[:,0] = 1.0\n",
|
||||
"\n",
|
||||
"for degree in range(Maxpolydegree):\n",
|
||||
|
||||
@@ -441,7 +441,7 @@ the sum $\sum_{i=0}^{n-1} X_{ij}$
|
||||
can be rewritten as
|
||||
!bt
|
||||
\[
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
\sum_{i=0}^{n-1} \left(X_{ij} - \frac{1}{n}\sum_{i=0}^{n-1} X_{ij}\right) = \sum_{i=0}^{n-1} X_{ij} - \sum_{i=0}^{n-1} \frac{1}{n} \sum_{i=0}^{n-1}X_{ij},
|
||||
\]
|
||||
!et
|
||||
resulting in
|
||||
@@ -464,7 +464,7 @@ or
|
||||
\beta_0 = \frac{1}{n}\sum_{i=0}^{n-1} y_i = \overline{\bm{y}},
|
||||
\]
|
||||
!et
|
||||
the average value of $\bm{y]$.
|
||||
the average value of $\bm{y}$.
|
||||
|
||||
Replacing $y_i$ with $y_i - \beta_0 = y_i - \overline{\bm{y}}$ in the cost function will give us (in vector-matrix disguise)
|
||||
!bt
|
||||
@@ -506,7 +506,7 @@ y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)
|
||||
|
||||
Maxpolydegree = 20
|
||||
X = np.zeros((n,Maxpolydegree))
|
||||
We include explicitely the intercpt column
|
||||
#We include explicitely the intercept column
|
||||
X[:,0] = 1.0
|
||||
|
||||
for degree in range(Maxpolydegree):
|
||||
|
||||
Reference in New Issue
Block a user