small typos
This commit is contained in:
@@ -17,7 +17,7 @@ o Scale the data properly
|
||||
We start with a very simple function
|
||||
!bt
|
||||
\[
|
||||
\f(x)= 2-x+5x^2,
|
||||
f(x)= 2-x+5x^2,
|
||||
\]
|
||||
!et
|
||||
|
||||
@@ -88,10 +88,10 @@ print("Closed-form OLS coefficients:", theta_closed_form)
|
||||
!ec
|
||||
|
||||
This computes the Ridge and OLS regression coefficients directly. The identity
|
||||
matrix $I$ has the same size as $X^T X$. It adds $\lambda$ to the diagonal of $X^T X for Ridge regression. We
|
||||
matrix $I$ has the same size as $X^T X$. It adds $\lambda$ to the diagonal of $X^T X$ for Ridge regression. We
|
||||
then invert this matrix and multiply by $X^T y$. The result
|
||||
for $\bm{\theta}$ is a NumPy array of shape (n$\_$features,) containing the
|
||||
fitted parameters $\bm{\theta}$..
|
||||
fitted parameters $\bm{\theta}$.
|
||||
|
||||
=== 3a) ===
|
||||
Finalize, in the above code, the OLS and Ridge regression determination of the optimal parameters $\bm{\theta}$.
|
||||
|
||||
Reference in New Issue
Block a user