Last answered:

08 Sept 2023

Posted on:

03 Sept 2023

0

Resolved: Linear-Regression Exercise

Course : "Complete Data Science Training: Mathematics, Statistics, Python, Advanced Statistics in Python, Machine & Deep Learning"

Section : 35-233. Linear Regression-Exercise

Hi 365 Teams ,  appreciate for your wonderful lecture , I got something to ask

I'm practicing the exercise using Section 35 Model

I thought I already delete the red square columns , why did it appear again ?

And by the way , I want to ask if I want to improve the model , using your suggestion "Perform Feature Selection"  to reduce some variables , is it right to do this ? 

Though I'm the beginner , really want to learn it well.

Best Regard !

1 answers ( 1 marked as helpful)
Instructor
Posted on:

08 Sept 2023

0

Hi Eric, 

thanks for reaching out! In your code you correctly delete the columns in questions from your code, and you create a new data frame data on line 13. 
Next, you remove the missing values from your data, however you remove them from the raw_data , which is the original data, which still has the additional columns. In your code, when you change line 14 to:

data_no_mv = data.dropna( axis = 0)

you should get the correct results. 

Lastly, you can indeed do feature selection and remove some columns from the analysis if you believe they are unnecessary or irrelevant to your analysis. 

Let me know if you have any further questions!

Best, 

365 Eli

Submit an answer