Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import numpy as np import pandas as pd Load mtcars df= pd.read_csv ( mtcars.csv) df. head() (a) [10 points] Split the data into train and

image text in transcribed
import numpy as np import pandas as pd "Load mtcars df= pd.read_csv ( "mtcars.csv") df. head() (a) [10 points] Split the data into train and test sets and print the size of each part. We keep two input features hp (horse power) and wt (weight), and the target is mpg (mile per gallon). (b) [20 points] Use sklearn to fit the training data using linear regression in four cases: (1) input: horse power, (2) input: weight, and (3) inputs: horse power and weight without preprocessing, and (4) inputs: horse power and weight with preprocessing (e.g 4 MinMaxScaler) (c) [10 points] Evaluate the performance of each regression model using at least two metrics. (d) [10 points] Does using preprocessing help achieve better results when considering both inputs

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

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago