课程: Complete Guide to AI and Data Science for SQL: From Beginner to Advanced

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Assumption 3: Checking linearity

Assumption 3: Checking linearity

- [Narrator] Now that you've checked for a homoscedasticity, let's cruise into assumption number three, the linearity of variables. But what does that mean exactly? Well, it's all about making sure your predictor variables and your dependent variable have a linear relationship. Imagine you're on a road trip and you want to make sure your car is following a straight path on the map. That's what you're doing here. You want to ensure that your variables aren't all over the place, but have a nice straight relationship. To test this assumption, you're going to plot something called residuals against fitted values. Think of it as checking if your car is following a straight line on the road. Now, here's the code that performs this test. Now let's take a look at your plot. What you're looking for are signs of a clear pattern or curve. Patterns or curves might suggest that the relationship between the predictor variables and…

内容