From the course: Machine Learning Foundations: Statistics
Unlock this course with a free trial
Join today to access over 23,200 courses taught by industry experts.
Fitting a line - Python Tutorial
From the course: Machine Learning Foundations: Statistics
Fitting a line
- [Instructor] When we covered linear regression, I didn't mention two important equations, now it's time to explore them. The linear regression model is an equation that describes a linear relationship. The equation that describes the straight line is y equals mx plus b, and similar to that, our equation which describes the linear equation model is y hat equals beta zero, plus beta one x one. Where beta zero is y-intercept, or value where the line intersects the y-axis, meaning x is equal to zero. And beta one is the slope or the size of the relationship. The beta one shows us the positive or negative relationship between the independent and dependent variables. x represents the value for the independent variable. So to get the predicted value for the dependent variable, y hat, we have to plug the value x in our model. And now when we look at the graph, the point P on the graph shows us the predicted value of y hat at x.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.