From eb12e84cf613bc111c655251bb80c9bbfa5561d0 Mon Sep 17 00:00:00 2001 From: Morten Hjorth-Jensen Date: Thu, 9 Sep 2021 07:27:17 +0200 Subject: [PATCH] update --- doc/pub/week36/html/week36-reveal.html | 4 ++-- doc/pub/week36/html/week36-solarized.html | 4 ++-- doc/pub/week36/html/week36.html | 4 ++-- doc/pub/week36/ipynb/ipynb-week36-src.tar.gz | Bin 192 -> 192 bytes doc/pub/week36/ipynb/week36.ipynb | 4 ++-- doc/src/week36/week36.do.txt | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/pub/week36/html/week36-reveal.html b/doc/pub/week36/html/week36-reveal.html index a8e0bff0f..510e721e1 100644 --- a/doc/pub/week36/html/week36-reveal.html +++ b/doc/pub/week36/html/week36-reveal.html @@ -787,7 +787,7 @@ which gives \( \lambda=4.571 \) and \( \beta_0=0.933 \) and \( \beta_1=0.359 \).

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

 
$$ C(\boldsymbol{\beta})=(4-2\beta_0)^2+(2-\beta_1)^2+\lambda(\vert\beta_0\vert+\vert\beta_1\vert), @@ -1176,7 +1176,7 @@ $$ which leads to

 
$$ -\hat{\boldsymbol{\beta}}_{mathrm{OLS}}=\left(\boldsymbol{X}^T\boldsymbol{X}\right^{-1}\boldsymbol{X}^T\boldsymbol{y}! +\hat{\boldsymbol{\beta}}_{\mathrm{OLS}}=\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}! $$

 
diff --git a/doc/pub/week36/html/week36-solarized.html b/doc/pub/week36/html/week36-solarized.html index c31e6c599..cbb0689ab 100644 --- a/doc/pub/week36/html/week36-solarized.html +++ b/doc/pub/week36/html/week36-solarized.html @@ -808,7 +808,7 @@ which gives \( \lambda=4.571 \) and \( \beta_0=0.933 \) and \( \beta_1=0.359 \).

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 $$ C(\boldsymbol{\beta})=(4-2\beta_0)^2+(2-\beta_1)^2+\lambda(\vert\beta_0\vert+\vert\beta_1\vert), $$ @@ -1150,7 +1150,7 @@ $$ which leads to $$ -\hat{\boldsymbol{\beta}}_{mathrm{OLS}}=\left(\boldsymbol{X}^T\boldsymbol{X}\right^{-1}\boldsymbol{X}^T\boldsymbol{y}! +\hat{\boldsymbol{\beta}}_{\mathrm{OLS}}=\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}! $$

diff --git a/doc/pub/week36/html/week36.html b/doc/pub/week36/html/week36.html index 828d35f4c..0a067dd6e 100644 --- a/doc/pub/week36/html/week36.html +++ b/doc/pub/week36/html/week36.html @@ -813,7 +813,7 @@ which gives \( \lambda=4.571 \) and \( \beta_0=0.933 \) and \( \beta_1=0.359 \).

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 $$ C(\boldsymbol{\beta})=(4-2\beta_0)^2+(2-\beta_1)^2+\lambda(\vert\beta_0\vert+\vert\beta_1\vert), $$ @@ -1155,7 +1155,7 @@ $$ which leads to $$ -\hat{\boldsymbol{\beta}}_{mathrm{OLS}}=\left(\boldsymbol{X}^T\boldsymbol{X}\right^{-1}\boldsymbol{X}^T\boldsymbol{y}! +\hat{\boldsymbol{\beta}}_{\mathrm{OLS}}=\left(\boldsymbol{X}^T\boldsymbol{X}\right)^{-1}\boldsymbol{X}^T\boldsymbol{y}! $$

diff --git a/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz b/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz index e45110d143fc297be12ae8e38bda75b65b1d0feb..45b8b91ed420da6847940ed2d88a7cef2046b621 100644 GIT binary patch literal 192 zcmV;x06+g9iwFQJn>k?s1MSbv3c@f92k@Qu6nTQtZtXk^?%+WX@dY}TxjNU*wnO*! z?gR9sco`z}cli?%LUPE~n_U*Uy9*XW2uT@(F;^*{lEia8p_Btl$u|b&^K1?Ntti uMmx5^;I)$mL8u-?QAj7X5|^+w`ea07qwv?yc%J8ZUwZ&9oL(6K2mk={H(Emg literal 192 zcmV;x06+g9iwFQ*nmJ(r1MSaC3c@fD2H>uHia9|^nulw_E?fvAULd8ZjkQTlQna_X z573q3rihSl^E1pa%p9`yW|t-Y?xV#ZggB)z=8Cf^Q99QXj2U2xF(;T|LIGjI(li3J z+(|E;^TH0NG}T#ZC-u9zVXQ1a?3rJIXa0#}r5tScy|0W0ZM@8lso^GNO?aZ(UguC4 u>BbgVdF_;yAaoC+D3n)5i%Z;EbF!jwN&M?)f*=TjuRQ=1`Mo{>2mk;T>R819 diff --git a/doc/pub/week36/ipynb/week36.ipynb b/doc/pub/week36/ipynb/week36.ipynb index 919e6242a..3f50ff006 100644 --- a/doc/pub/week36/ipynb/week36.ipynb +++ b/doc/pub/week36/ipynb/week36.ipynb @@ -970,7 +970,7 @@ "## Lasso case\n", "\n", "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$\n", - "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" ] }, { @@ -1511,7 +1511,7 @@ "metadata": {}, "source": [ "$$\n", - "\\hat{\\boldsymbol{\\beta}}_{mathrm{OLS}}=\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right^{-1}\\boldsymbol{X}^T\\boldsymbol{y}!\n", + "\\hat{\\boldsymbol{\\beta}}_{\\mathrm{OLS}}=\\left(\\boldsymbol{X}^T\\boldsymbol{X}\\right)^{-1}\\boldsymbol{X}^T\\boldsymbol{y}!\n", "$$" ] }, diff --git a/doc/src/week36/week36.do.txt b/doc/src/week36/week36.do.txt index 77f964392..047fe5215 100644 --- a/doc/src/week36/week36.do.txt +++ b/doc/src/week36/week36.do.txt @@ -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