Question: a Use the Diabetes dataset for linear regression Split the dataset into two sets randomly i Training Set 70 ii Validation Set 30 b Write

a Use the Diabetes dataset for linear regression Split the dataset into two sets randomly i Training Set 70 ii Validation Set 30 b Write a function that accepts Xi and Yi values as input and returns the coefficients of the regression line using the least square method Do not use any machine learning libraries for this task Utilize the training set to obtain the regres sion coefficients Proceed to use the regression line for prediction on the validation set and calculate the Mean Squared Error MSE and R2 score Finally plot the Y True i Y Pred i for the validation dataset c Solve the above part b utilizing scikitlearn library Compare its predictive per formance with that of your implementation on the validation dataset d Apply forward stepwise selection and obtain the best feature set and the regression line Use MSE on the validation set for model selection Report the MSE and R2 on the validation set e Apply ridge regression and obtain the regression line Find its MSE and R2 score on the validation set Do this for in 01 1 1 10 100 Which is the best You may use scikitlearn library f Apply lasso regression and obtain the regression line Find its MSE and R2 score on the validation set Do this for in 01 1 1 10 100 Which is the best You may use scikitlearn library

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 Databases Questions!