cleaning up typos
This commit is contained in:
@@ -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