Question: Use the heart data set for this question. Make sure to use R or R-studio for this question. You can find the data in the

Use the heart data set for this question. Make sure to use R or R-studio for this question. You can find the data in the below link. Besides answers and steps, PLEASE also prepare the R file for R script (you can add screenshot of R script. Thanks!)

data link:

https://raw.githubusercontent.com/tofighi/MachineLearning/master/datasets/heart.csv

The heart data set consists of a retrospective sample of males in a heart-disease high-risk region of the Western Cape, South Africa. Use sbp (symbolic blood pressure) as response variable and obesity as predictor. (a) Fit a polynomial regression for the heart data set, use cross validation to find the best polynomial model (b) Fit a cubic spline with three knots, the knots are chosen uniformly. (c) Fit a natural spline with same knots. (d) Fit a smooth spline model with degrees of freedom to be determined by cross validation. (e) Fit a kernel regression model with Gaussian kernel. (f) Which of the above models provides the best prediction performance? Please describe what validation method you used.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!