Question: Generate your own data to simulate the linear regression model y = 07x +e. Generate n such independent training data vectors. Also generate ntest independent

Generate your own data to simulate the linear regression model y = 07x +e. Generate n such independent training data vectors. Also generate ntest independent data vectors for the testing step. Let N(u, 2) denote the Gaussian distribution with mean u and covariance E. Do this as follows: (i) Fix 0 once as specified below. (ii) Training data generate: For i =1 to n, generate x(i) ~ N(0,1), eli) ~ N(0,02I) and y(i) = 0 + xli) +eli), (iii) Test data generate: In a different loop, repeat (b) for i = 1 to Ntest. Use this data in the testing step and not for training. Question 1 (30 points]: Generate the data for the following settings: (a) [5 points] Pick n = 30,100,1000, d=5, and set e = 0. Let @ = [0,1,4, 2, 10, 23). (b) [5 points] Pick n = 30,100,1000, d = 5, and set 02 = 10-6. Let 6 = [0,1,4,2, 10, 23). (c) [5 points] Pick n = 100,100,1000, d =5, and set 04 = 10-6. Let 0 = [0,1,4,2, 10,23). (d) [5 points] Repeat (b) with generating x(i) ~ N(Mx,I) with x = [1,1,1,1,1]. For this you need to choose a non-zero 00. (e) [10 points] Repeat (b) with generating x(i) ~ N(0, 2) with being a general covariance matrix. Specify in your report what diagonal entries you chose for and what effect that had. Pick anything other than all equal entries
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
