update
This commit is contained in:
@@ -531,7 +531,7 @@ which gives $\lambda=4.571$ and $\beta_0=0.933$ and $\beta_1=0.359$.
|
||||
===== Lasso case =====
|
||||
|
||||
For Lasso we need now, keeping a constraint on $\vert\beta_0\vert+\vert\beta_1\vert=1$, to take the derivative of the absolute values of $\beta_0$
|
||||
and $beta_1$. This gives us the following derivatives of the cost function
|
||||
and $\beta_1$. This gives us the following derivatives of the cost function
|
||||
!bt
|
||||
\[
|
||||
C(\bm{\beta})=(4-2\beta_0)^2+(2-\beta_1)^2+\lambda(\vert\beta_0\vert+\vert\beta_1\vert),
|
||||
@@ -856,7 +856,7 @@ Taking the derivative of the *new* cost function with respect to the parameters
|
||||
which leads to
|
||||
!bt
|
||||
\[
|
||||
\hat{\bm{\beta}}_{mathrm{OLS}}=\left(\bm{X}^T\bm{X}\right^{-1}\bm{X}^T\bm{y}!
|
||||
\hat{\bm{\beta}}_{\mathrm{OLS}}=\left(\bm{X}^T\bm{X}\right)^{-1}\bm{X}^T\bm{y}!
|
||||
\]
|
||||
!et
|
||||
|
||||
|
||||
Reference in New Issue
Block a user