Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles of Auditing and Other Assurance Services

Authors: Ray Whittington, Kurt Pany

19th edition

978-0077804770, 78025613, 77804775, 978-0078025617

Students also viewed these Mathematics questions

Question

What are the seven basic steps in reviewing computer-based systems?

Answered: 1 week ago

Question

What are the APPROACHES TO HRM?

Answered: 1 week ago