Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python, and its SkLearn Library, implement Linear Regression on California Housing Dataset. The dataset can be found in the SkLearn library. At first pick

Using Python, and its SkLearn Library, implement Linear Regression on California
Housing Dataset.
The dataset can be found in the SkLearn library. At first pick an x variable (There are
around 9x variables) and a Y variable which is the median price of a house in California,
and predict the Y value using simple regression.
Then use all of the x variables to predict the Y value.
You have the following tasks;
Import the California Housing dataset
Split the dataset for the training and the test set, if there are any empty parts in
the dataset you need to remove it using dropna() method from pandas library
Pick the number of the rooms (named totalrooms in the dataset)x variable and
implement Simple regression to find the median house price Y (named as median-
housevalue in the dataset)
Evaluate the performance, and print the R2 and MSE results
Use all of the x values to implement multiple regression to find the median house
price Y
Evaluate the performance, and print the R2 and MSE results
(Optional) You can visualize the regression by using matplotlib.pyplot library of
Python.
image text in transcribed

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Have roles been defined and assigned?

Answered: 1 week ago

Question

Are these written ground rules?

Answered: 1 week ago

Question

How do members envision the ideal team?

Answered: 1 week ago