辅导BIC留学生、讲解LASSO method、辅导Matlab、Matlab程序设计调试 辅导留学生 Statistics统计、回归、迭代
- 首页 >> 其他 Question 3
Write a Matlab code to implement model selection based on the LASSO method (use the Matlab
quadprog function). Please select the parameter X by finding the minimum of BIC[
on a grid of X
values.
Apply your code to the data shown in the table below. Consider the full model 8 = :7 + :\ +:] + :^_ + :`a + :6b] + :_ + :`a + :6b + <, and evaluate
BIC[ on the grid C0,0.001,0.002, … ,1F of X values .
Compare your results to the Bayesian variable selection method described in the slides. Set c =
10, c7 = 0, G = 0.05, , = 0.5, and (d) = ∏ 0.5f$0.5f$ .
In addition, compare with model selection results obtained with the PRESS and BIC criteria. Question 4:
Write a Matlab code to fit a stationary (implies mean and variance are constants) Gaussian
random field model with Gaussian correlation function and compute its posterior mean and 95%
interval predictions (for simplicity, you may write a code that works just for the case of a single
real input ). Apply your code to the data below, and plot the data, posterior mean, 95%
prediction intervals, and the true function q = sin (7) in the same figure. Please report the
maximum likelihood estimates of the prior mean :, prior variance
, and parameter Q in the
Gaussian correlation function.
q
0 sin(7 × 0)
0.2 sin(7 × 0.2)
0.4 sin(7 × 0.4)
0.6 sin(7 × 0.6)
0.8 sin(7 × 0.8)
1 sin(7 × 1)
Write a Matlab code to implement model selection based on the LASSO method (use the Matlab
quadprog function). Please select the parameter X by finding the minimum of BIC[
on a grid of X
values.
Apply your code to the data shown in the table below. Consider the full model 8 = :7 + :\ +:] + :^_ + :`a + :6b] + :_ + :`a + :6b + <, and evaluate
BIC[ on the grid C0,0.001,0.002, … ,1F of X values .
Compare your results to the Bayesian variable selection method described in the slides. Set c =
10, c7 = 0, G = 0.05, , = 0.5, and (d) = ∏ 0.5f$0.5f$ .
In addition, compare with model selection results obtained with the PRESS and BIC criteria. Question 4:
Write a Matlab code to fit a stationary (implies mean and variance are constants) Gaussian
random field model with Gaussian correlation function and compute its posterior mean and 95%
interval predictions (for simplicity, you may write a code that works just for the case of a single
real input ). Apply your code to the data below, and plot the data, posterior mean, 95%
prediction intervals, and the true function q = sin (7) in the same figure. Please report the
maximum likelihood estimates of the prior mean :, prior variance
, and parameter Q in the
Gaussian correlation function.
q
0 sin(7 × 0)
0.2 sin(7 × 0.2)
0.4 sin(7 × 0.4)
0.6 sin(7 × 0.6)
0.8 sin(7 × 0.8)
1 sin(7 × 1)