From 0a4e451fea59168cc89a11db0e4b3d1a8d1618bc Mon Sep 17 00:00:00 2001 From: Morten Hjorth-Jensen Date: Tue, 28 Sep 2021 21:03:20 +0200 Subject: [PATCH] update week 39 --- doc/pub/week39/html/week39-reveal.html | 3 +++ doc/pub/week39/html/week39-solarized.html | 3 +++ doc/pub/week39/html/week39.html | 3 +++ doc/pub/week39/ipynb/ipynb-week39-src.tar.gz | Bin 193 -> 193 bytes doc/pub/week39/ipynb/week39.ipynb | 3 +++ doc/src/week39/week39.do.txt | 3 +++ 6 files changed, 15 insertions(+) diff --git a/doc/pub/week39/html/week39-reveal.html b/doc/pub/week39/html/week39-reveal.html index 8e10ec464..42460a08e 100644 --- a/doc/pub/week39/html/week39-reveal.html +++ b/doc/pub/week39/html/week39-reveal.html @@ -303,6 +303,9 @@ ypredictRidge = gridsearch.predict(X_test)

By default the grid search function includes cross validation with five folds. The Scikit-Learn documentation contains more information on how to set the different parameters. + +

+If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit. diff --git a/doc/pub/week39/html/week39-solarized.html b/doc/pub/week39/html/week39-solarized.html index f8a11d320..7dc0d0002 100644 --- a/doc/pub/week39/html/week39-solarized.html +++ b/doc/pub/week39/html/week39-solarized.html @@ -388,6 +388,9 @@ ypredictRidge = gridsearch.predict(X_test)

By default the grid search function includes cross validation with five folds. The Scikit-Learn documentation contains more information on how to set the different parameters. +

+If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit. +











diff --git a/doc/pub/week39/html/week39.html b/doc/pub/week39/html/week39.html index 42321f373..6c91bc434 100644 --- a/doc/pub/week39/html/week39.html +++ b/doc/pub/week39/html/week39.html @@ -393,6 +393,9 @@ ypredictRidge = gridsearchScikit-Learn documentation contains more information on how to set the different parameters. +

+If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit. +











diff --git a/doc/pub/week39/ipynb/ipynb-week39-src.tar.gz b/doc/pub/week39/ipynb/ipynb-week39-src.tar.gz index ac5189fac63b9ed2229eba9353fce8ec03220c45..2d12ed541e1e03859881ced9ae078e3fc4e706c4 100644 GIT binary patch literal 193 zcmV;y06za8iwFQ_W>aAR1MSbv3c@f92k@Qu6nTQtZe7Kr;0_)H5nrHVnX9^XwjH{+ zcORf9#mf+(zssMH5R!eiT5q$+-CZynLI`IJhFtJ;OcGD^h|&}&qcP(=p^O8eNt(m~ zkoit}X{{5cKc%its4S{?bNyIZe%Ld;0?+&the}%5>^fIz1xh>2wLZfQ@tiCp*>oz0 vLZcm8VDQ>XgCJA~q9~-3T8T^87=1LNwo&-&XFSjIystd~&WN}|00;m87(7?w literal 193 zcmV;y06za8iwFR_=~7_;1MSaC3c@fD2H>uHia9|^nxw_0U>7a~5igL^)W+JRCMnw6 z+Xv`MaZ^OdxA_@n7-kOHdb7(ScXz>J5JCy1FlL&tDN#Jv6O0*Piet(Wnxq5}CXA#3 zpyf__>8#^sIHjr1LRq2S%?)E^`C-re3Ow^q94l#IyYF446)5dQu5}GJA!@RUWZSD8 v3N7r|0wb=SGy=Hlfft2zQY(H5Tcb~gH#Q1?{fy^%p7*r}b?kwG00;m8b+A>k diff --git a/doc/pub/week39/ipynb/week39.ipynb b/doc/pub/week39/ipynb/week39.ipynb index 65c5ab2bf..0ed7d500a 100644 --- a/doc/pub/week39/ipynb/week39.ipynb +++ b/doc/pub/week39/ipynb/week39.ipynb @@ -176,6 +176,9 @@ "source": [ "By default the grid search function includes cross validation with five folds. The [Scikit-Learn documentation](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV) contains more information on how to set the different parameters.\n", "\n", + "If we take out the random noise, running the above codes results in $\\lambda=0$ yielding the best fit. \n", + "\n", + "\n", "## Randomized Grid Search\n", "\n", "An alternative to the above manual grid set up, is to use a random\n", diff --git a/doc/src/week39/week39.do.txt b/doc/src/week39/week39.do.txt index e01b937df..af50f5af2 100644 --- a/doc/src/week39/week39.do.txt +++ b/doc/src/week39/week39.do.txt @@ -139,6 +139,9 @@ print(f"R2 score: {R2(y_test,ypredictRidge)}") By default the grid search function includes cross validation with five folds. The "Scikit-Learn documentation":"https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" contains more information on how to set the different parameters. +If we take out the random noise, running the above codes results in $\lambda=0$ yielding the best fit. + + !split ===== Randomized Grid Search =====