correcting typos
This commit is contained in:
@@ -503,7 +503,7 @@ that is the degree of a given polynomial.
|
||||
|
||||
<p>The aim is to reproduce Figure 2.11 of <a href="https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf" target="_self">Hastie et al</a>.</p>
|
||||
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points. You should try to vary \( n \) in your analysis.</p>
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( n=100 \) data points. You should try to vary the number of data points \( n \) in your analysis.</p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
@@ -544,7 +544,8 @@ Write a first code which sets up a design matrix \( X \) defined by a fifth-orde
|
||||
<!-- --- begin subexercise --- -->
|
||||
<p>
|
||||
<b>b)</b>
|
||||
Perform an ordinary least squares fitting and compute the means squared error for the training data and the test data.
|
||||
Write thereafter (using either <b>scikit-learn</b> or your matrix inversion code using for example <b>numpy</b>)
|
||||
and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial.
|
||||
</p>
|
||||
|
||||
<!-- --- end subexercise --- -->
|
||||
|
||||
@@ -3966,7 +3966,7 @@ that is the degree of a given polynomial.
|
||||
|
||||
<p>The aim is to reproduce Figure 2.11 of <a href="https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf" target="_blank">Hastie et al</a>.</p>
|
||||
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points. You should try to vary \( n \) in your analysis.</p>
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( n=100 \) data points. You should try to vary the number of data points \( n \) in your analysis.</p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
@@ -4007,7 +4007,8 @@ Write a first code which sets up a design matrix \( X \) defined by a fifth-orde
|
||||
<!-- --- begin subexercise --- -->
|
||||
<p>
|
||||
<b>b)</b>
|
||||
Perform an ordinary least squares fitting and compute the means squared error for the training data and the test data.
|
||||
Write thereafter (using either <b>scikit-learn</b> or your matrix inversion code using for example <b>numpy</b>)
|
||||
and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial.
|
||||
</p>
|
||||
|
||||
<!-- --- end subexercise --- -->
|
||||
|
||||
@@ -3831,7 +3831,7 @@ that is the degree of a given polynomial.
|
||||
|
||||
<p>The aim is to reproduce Figure 2.11 of <a href="https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf" target="_blank">Hastie et al</a>.</p>
|
||||
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points. You should try to vary \( n \) in your analysis.</p>
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( n=100 \) data points. You should try to vary the number of data points \( n \) in your analysis.</p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
@@ -3872,7 +3872,8 @@ Write a first code which sets up a design matrix \( X \) defined by a fifth-orde
|
||||
<!-- --- begin subexercise --- -->
|
||||
<p>
|
||||
<b>b)</b>
|
||||
Perform an ordinary least squares fitting and compute the means squared error for the training data and the test data.
|
||||
Write thereafter (using either <b>scikit-learn</b> or your matrix inversion code using for example <b>numpy</b>)
|
||||
and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial.
|
||||
</p>
|
||||
|
||||
<!-- --- end subexercise --- -->
|
||||
|
||||
@@ -3908,7 +3908,7 @@ that is the degree of a given polynomial.
|
||||
|
||||
<p>The aim is to reproduce Figure 2.11 of <a href="https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf" target="_blank">Hastie et al</a>.</p>
|
||||
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points. You should try to vary \( n \) in your analysis.</p>
|
||||
<p>Our data is defined by \( x\in [-3,3] \) with a total of for example \( n=100 \) data points. You should try to vary the number of data points \( n \) in your analysis.</p>
|
||||
|
||||
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
@@ -3949,7 +3949,8 @@ Write a first code which sets up a design matrix \( X \) defined by a fifth-orde
|
||||
<!-- --- begin subexercise --- -->
|
||||
<p>
|
||||
<b>b)</b>
|
||||
Perform an ordinary least squares fitting and compute the means squared error for the training data and the test data.
|
||||
Write thereafter (using either <b>scikit-learn</b> or your matrix inversion code using for example <b>numpy</b>)
|
||||
and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial.
|
||||
</p>
|
||||
|
||||
<!-- --- end subexercise --- -->
|
||||
|
||||
Binary file not shown.
+304
-303
File diff suppressed because it is too large
Load Diff
@@ -2584,7 +2584,7 @@ that is the degree of a given polynomial.
|
||||
|
||||
The aim is to reproduce Figure 2.11 of "Hastie et al":"https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf".
|
||||
|
||||
Our data is defined by $x\in [-3,3]$ with a total of for example $100$ data points. You should try to vary $n$ in your analysis.
|
||||
Our data is defined by $x\in [-3,3]$ with a total of for example $n=100$ data points. You should try to vary the number of data points $n$ in your analysis.
|
||||
!bc pycod
|
||||
np.random.seed()
|
||||
n = 100
|
||||
@@ -2598,7 +2598,8 @@ Write a first code which sets up a design matrix $X$ defined by a fifth-order po
|
||||
!esubex
|
||||
|
||||
!bsubex
|
||||
Perform an ordinary least squares fitting and compute the means squared error for the training data and the test data.
|
||||
Write thereafter (using either _scikit-learn_ or your matrix inversion code using for example _numpy_)
|
||||
and perform an ordinary least squares fitting and compute the mean squared error for the training data and the test data. These calculations should apply to a model given by a fifth-order polynomial.
|
||||
!esubex
|
||||
|
||||
!bsubex
|
||||
|
||||
Reference in New Issue
Block a user