correcting typos
This commit is contained in:
@@ -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