Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ireads csv into a dataframe df - pd.read csv(/content/drive/HyDrive/Ms 365/cardata.csv) print(df.head()) Uprint a summary of ati the columns in the dataframe and their data types

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Ireads csv into a dataframe df - pd.read csv("/content/drive/HyDrive/Ms 365/cardata.csv") print(df.head()) Uprint a summary of ati the columns in the dataframe and their data types print(df.dtypes) Question 1 (40 pts): You have a dataset, car_data.csv. In this dataset we have datapoints describing the characteristics of different cars and we have the prices for each car. Train a multiple linear regression model to estimate the the price of the car. Calculate the ME and r-squared for. your model, Then answer the second cell: 1. Identify the predictor that is most helpful in producing an accurate model 2. Identify the predcitor that is least helpful in producing an accurate model 3. What predictors cause a change in both the error of the model AND r'squared that seems counter-intuitive? 4. Explain what you saw that is counter intuitive Hint You can create as many cells as you need to complete these tasks and answer the questions, but make sure the last cell has the answers. in a comment. [8] predictors ["price, cartiane"] x difpredictoesl y=df price_of_car = tinearkegression() price_of car,fit (peice, Gartiane) Keytrror sipythoo ioput-1l - 6asafagacecaz in (modules 1 predictors ["price, Carnaee"] [8] predictors- ["price, CarNase"] xidf [predictors] y=df price_of car = LinearRegression() price_of_car,fit (Price, Carkane) Keyerror Slpython-input - 8.635af4968f13z in ciodures traceback (most recent call last) 1 predictors ["price, Carkane"] 3x... 4 df[predictors] 3 y-af Lusr/local/ub/pxthons. B/dist packages/pandas/core/indexing py in validate_read_indexer(self, key, indexer, axis) key = list (key) raise keyerror (f-"lone of {( key }] are in the [(axisname)]) 1376 not found = 1ist (ensure index(key) [aissing mask, Bonzero (0[]1. unique( ) ) Keyfrror: "Wone of [index (['price, carkame'], dtype- 'object')] are in the [coluans]" I I "answer questions here as a comment: 1. 2. 3. 4+ Question 2 (10 pts): For the two predictors identified in parts 1 and 2 from Q1, illustrate the relationship between those predictors and the target

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

Define workplace ergonomics.

Answered: 1 week ago

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago