cleaning up typos

This commit is contained in:
Morten Hjorth-Jensen
2021-09-22 11:17:51 +02:00
parent 9a41d1c594
commit 07d63b0596
8 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -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):