From 9c700b8c997c1b9db958de537b0e387780dc83c4 Mon Sep 17 00:00:00 2001 From: Morten Hjorth-Jensen Date: Thu, 26 Aug 2021 09:50:09 +0200 Subject: [PATCH] update week 34 and typos --- doc/pub/week34/html/week34-reveal.html | 6 ------ doc/pub/week34/html/week34-solarized.html | 6 ------ doc/pub/week34/html/week34.html | 6 ------ doc/pub/week34/ipynb/ipynb-week34-src.tar.gz | Bin 103349 -> 103349 bytes doc/pub/week34/ipynb/week34.ipynb | 6 ------ doc/src/week34/week34.do.txt | 3 --- 6 files changed, 27 deletions(-) diff --git a/doc/pub/week34/html/week34-reveal.html b/doc/pub/week34/html/week34-reveal.html index aee4372b9..65ed570ca 100644 --- a/doc/pub/week34/html/week34-reveal.html +++ b/doc/pub/week34/html/week34-reveal.html @@ -2459,12 +2459,6 @@ Write a first code which sets up a design matrix \( X \) defined by a fifth-orde b) Perform an ordinary least squares and compute the means squared error and the \( R2 \) factor for the training data and the test data, with and without scaling. -

- -Solution. -This requires a simple extension to the above code where you simply add a statement calling the \( R2 \) function included in the same code. - -

c) Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE and \( R2 \) for the training and test data and plot both test and training data MSE and \( R2 \) as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)? diff --git a/doc/pub/week34/html/week34-solarized.html b/doc/pub/week34/html/week34-solarized.html index 3ad4cd330..22adb2008 100644 --- a/doc/pub/week34/html/week34-solarized.html +++ b/doc/pub/week34/html/week34-solarized.html @@ -2433,12 +2433,6 @@ Write a first code which sets up a design matrix \( X \) defined by a fifth-orde b) Perform an ordinary least squares and compute the means squared error and the \( R2 \) factor for the training data and the test data, with and without scaling. -

- -Solution. -This requires a simple extension to the above code where you simply add a statement calling the \( R2 \) function included in the same code. - -

c) Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE and \( R2 \) for the training and test data and plot both test and training data MSE and \( R2 \) as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)? diff --git a/doc/pub/week34/html/week34.html b/doc/pub/week34/html/week34.html index 8858176d6..90572a6a0 100644 --- a/doc/pub/week34/html/week34.html +++ b/doc/pub/week34/html/week34.html @@ -2438,12 +2438,6 @@ Write a first code which sets up a design matrix \( X \) defined by a fifth-orde b) Perform an ordinary least squares and compute the means squared error and the \( R2 \) factor for the training data and the test data, with and without scaling. -

- -Solution. -This requires a simple extension to the above code where you simply add a statement calling the \( R2 \) function included in the same code. - -

c) Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE and \( R2 \) for the training and test data and plot both test and training data MSE and \( R2 \) as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)? diff --git a/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz b/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz index f2a20ab0c73ed03cab0c573673ce4612afa5ce36..24fee0d8df744ddd2c094b8bff02b27e8ab0bbfd 100644 GIT binary patch delta 20 ccmdnGoNeoJHa7Wg4u-|;M1& delta 20 ccmdnGoNeoJHa7Wg4u%PCjci-l7}rk*081MN*Z=?k diff --git a/doc/pub/week34/ipynb/week34.ipynb b/doc/pub/week34/ipynb/week34.ipynb index 743009923..3635c06b1 100644 --- a/doc/pub/week34/ipynb/week34.ipynb +++ b/doc/pub/week34/ipynb/week34.ipynb @@ -2818,12 +2818,6 @@ "**b)**\n", "Perform an ordinary least squares and compute the means squared error and the $R2$ factor for the training data and the test data, with and without scaling.\n", "\n", - "\n", - "\n", - "**Solution.**\n", - "This requires a simple extension to the above code where you simply add a statement calling the $R2$ function included in the same code.\n", - "\n", - "\n", "**c)**\n", "Add now a model which allows you to make polynomials up to degree $15$. Perform a standard OLS fitting of the training data and compute the MSE and $R2$ for the training and test data and plot both test and training data MSE and $R2$ as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?\n", "\n", diff --git a/doc/src/week34/week34.do.txt b/doc/src/week34/week34.do.txt index 7b789a744..ddd117802 100644 --- a/doc/src/week34/week34.do.txt +++ b/doc/src/week34/week34.do.txt @@ -1916,9 +1916,6 @@ Write a first code which sets up a design matrix $X$ defined by a fifth-order po !bsubex Perform an ordinary least squares and compute the means squared error and the $R2$ factor for the training data and the test data, with and without scaling. -!bsol -This requires a simple extension to the above code where you simply add a statement calling the $R2$ function included in the same code. -!esol !esubex !bsubex