Question: Task2: Linear regression: This is a dataset to predict the heath insurance costs of customers for a real health isurance company. Target variable is charges

Task2: Linear regression: This is a dataset to predict the heath insurance costs of customers for a real health isurance company. Target variable is "charges" , For "sex", and "smoker" features, replace classes with 0 or 1. For instance "female" could be 0, "male" could be 1. Choice of 0 and 1 is oprional. You will use these to build the model ,, Use multiple linear regressionto predict charges. Set 20% of the data to be "test" set. Calculate RMSE for test set and training set. a) Calculate RMSE?

b) which feature better to be dropped? Compare first model and second model

c) which model is better

d) why

age sex bmi children smoker charges
19 0 27.9 0 0 16884.92
18 1 33.77 1 1 1725.552
28 1 33 3 1 4449.462
33 1 22.705 0 1 21984.47
32 1 28.88 0 1 3866.855
31 0 25.74 0 1 3756.622
46 0 33.44 1 1 8240.59
37 0 27.74 3 1 7281.506
37 1 29.83 2 1 6406.411

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!