Question: 1.With the given dataset in a csv file, named boston.csv. Read the boston_readme.txt carefully and finish the following task: 1. Load the data, covert your

1.With the given dataset in a csv file, named boston.csv. Read the boston_readme.txt carefully and finish the following task:

1. Load the data, covert your data to pandas DataFrame. 2. Clean your data (Please only consider the missing values). 3. Choose ONE independent variable assign to X, and medv as dependent variable, assign to y. 4. Split the data into training and testing sets. 5. Use LinearRegression() to train your model. 6. Use your trained model to predict for test dataset. 7. Evaluate the performance of the model. 8. Print the equation of your regression 9. Interpret your evaluation. 10. Extra credit: Make a plot to represent your linear regression model.

2. Continue with the Question 1 (copy and create a new file), finish the following task:

1. Choose ALL independent variables, repeat the steps in Question 1 step 4 - 9 2. Compare the performance of the result vs. the performance of Question 1. Interpret it.

3. Continue with the Question 1 (copy and create a new file), finish the following task:

1. Choose the SAME independent variable as Question 1, create a Polynomial Regression, use degree = 2, then repeat Question 1 step 4-9, step 10 for extra credits. 2. Test your programs from degree = 2 to degree = 5, compare the performance (include Question 1 performance), then interpret your observation. Explain what is overfitting.

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 Databases Questions!