The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Multiple Linear Regression and Attendance example

Multiple Linear Regression and Attendance example

Super Learner
0
Votes
1
Answer

Hi
It is said that one of the most crucial conditions which should not be violated in Linear Regression is linearity. Thus, to make sure that the condition is not violated, the dependent variable should be individually plotted against the independent variables. 
In Machine Learning in Python course, when it comes to Linear Multiple Regression, if the Attendance is plotted against the GPA the condition is violated. How this issue should be treated?

1 Answer

365 Team
0
Votes

Hi Alireza,
thanks so much for reaching out! To your question:
There are 3 options when we see issue with the linearity  condition:

  1. run a non-linear regression
  2. use exponential transformation
  3. use log transformation

In the section ‘Linear Regression-Practical Example’ in the course Machine Learning in Python in the second lecture entitled ‘Practical example(part2)’ we see the application of the  log transformation. Namely, we plot ‘Price’ feature versus ‘Year’, ‘Engine Volume’  etc. and we spot that there is an issue exactly as yours-we take the log of ‘Price’ and create another column called ‘log_price’ then we plot ‘Year’ and ‘Engine volume’ against the newly created ‘log_price’ and we see a linear dependence.

Hope this helps!

Best,

365 Eli

JanuaryPromo
×
Complete Data Science Education
Get 50% OFF