Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

SEMESTER 2 EXAMINATION 2022/23

Math6168 Machine Learning: Coursework 2

Due Date: 11pm on Thur 11th May 2023 in Week 11

Worth: 100 marks (30% of the nal result).

(a) Handed in online on the module Math6168 Blackboard by the dead-

line specied above.

(b) Standard university guidelines will be followed for late coursework.

(c) All coursework must be carried out and written up independently. Standard School of Mathematics guidelines will be used to detect excessive collaboration and plagiarism, and appropriate penalties will be issued if required.  All suspicious cases will be referred to the academic integrity officer!

(d) The page limit (specificed in question(s)) is strict and is easily suf- ficient to receive full credit. All materials related to a question, in- cluding plots and any appendices, must fall within these limits. You do not have to (i.e.  may or may not) submit the computer code which you used for the analysis (unless requested in question), but you should explain clearly what analysis has been done with justi- fication.  Marks will be deducted for work which exceeds the page limits. If you have too much material then you need to decide what is important and what can be left out.

(e) The questions involve the modelling of real data. There is not nec-essarily a single ‘correct’ answer. Submissions which demonstrate a good appreciation of statistical modelling principles, together with correct application of appropriate methods will receive high marks.

1.   [Total 30 marks, no page limit]

Suppose that yi  = β1Xi1 + β2Xi2 + ei, where ei , i = 1, . . . , n, are independent and identically distributed from a N (0, σ2 ) distribution, with Xi  = (Xi1, Xi2)\ being non-random design vector. Here X\ stands for the transpose of a vector X .

(a) Given the data (yi , Xi1, Xi2), i = 1, 2, . . . , n, suggest the log likelihood 1(β, σ2 ), and nd the maximum likelihood estimators of β = (β1 , β2 )\ and σ 2 .  [10 marks]

(b) Explain the idea of ridge regression, and suggest your estimate of the regression coefficients β = (β1 , β2 )\ and the error variance σ 2  by ridge regression based on the log likelihood 1(β, σ2 ) for a particular value of λ e (0, o).  Derive the estimators of β  =  (β1 , β2 )\  and σ 2  in terms of the given λ or other relevant tuning parameter.    [10 marks]

(c) Explain the idea of LASSO regression, and suggest your estimate of the regres- sion coefficients β = (β1 , β2 )\ and the error variance σ 2 by LASSO regression based on the log likelihood 1(β, σ2 ) for a particular value of λ e (0, o). Derive the estimators of β = (β1 , β2 )\ and σ 2 in terms of the given λ or other relevant tuning parameter in the case that β1  > 0 and β2  > 0.                          [10 marks]

2.   [Total 70 marks, 5 sided A4 pages maximum]

The data set, BostonPart .txt, available on Blackboard, contains the observations on crime rate and 12 other variables on 506 towns in Boston.  The dataset has 13

columns containing:

crim [per capita crime rate by town],

zn [proportion of residential land zoned for lots over 25,000 sq.ft.],

indus [proportion of non-retail business acres per town],

chas [Charles River dummy variable, = 1 if tract bounds river, and 0 otherwise],

nox [nitrogen oxides concentration, in parts per 10 million],

rm [average number of rooms per dwelling],

age [proportion of owner-occupied units built prior to 1940],                 dis [weighted mean of distances to ve Boston employment centres], rad [index of accessibility to radial highways],

tax [full-value property-tax rate per $10,000],

ptratio [pupil-teacher ratio by town],

black [1000(Bk _ 0.63)2 , where Bk is the proportion of blacks by town],

lstat [lower status of the population, in percent].

Split the data set, BostonPart, into a training set and a test set in a proportion of 70% and 30%, respectively. We will now try to model crim [per capita crime rate by town] based on the other 12 variables in the BostonPart data set.

(a) Explain your idea with justification and implementation on how to t a linear model using least squares on the training set. Further explain the established model, and calculate the mean absolute error (MAE) for the test data set.              [13 marks]

(b) Explain your idea with justification and implementation on how to t a ridge re- gression model on the training set, with λ chosen by cross-validation in MAE.

Further explain the established model, and report the MAE for the test data set.  [13 marks]

(c) Explain your idea with justification and implementation on how to t a lasso model on the training set, with λ chosen by cross-validation in MAE. Further explain the established model, and report the MAE for the test data set, along with the number of non-zero coefficient estimates.                                                            [13 marks]

(d) Explain your idea with justification and implementation on how to t a PCR (princi- pal component regression) model on the training set, with number of components, M, chosen by cross-validation in mean absolute error (MAE). Further explain the established model, and report the MAE for the test data set, along with the value of M selected by cross-validation.          [13 marks]

(e) Explain your idea with justification and implementation on how to t a PLS (partial least squares) model on the training set, with number of components, M, chosen by cross-validation in MAE. Explain the established model, and report the MAE for the test data set, along with the value of M selected by cross-validation. [13 marks]

(f) Based on the results obtained in (a)– (e), answer the questions with your careful justifications: (i) How accurately can you predict the per capita crime rate by town for each of these ve approaches?  (ii) Is there much difference among the test errors resulting from these ve approaches?                                            [5 marks]