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 f2a20ab0c..24fee0d8d 100644 Binary files a/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz and b/doc/pub/week34/ipynb/ipynb-week34-src.tar.gz differ 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