From the course: Machine Learning Foundations: Statistics

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Linear least squares

Linear least squares

- [Instructor] To achieve the most precise line that reflects the provided sample points, we utilize the highly effective technique of linear least squares, also known as the least squared error. This method is done simply by squaring all the errors or residuals, adding all of them, and minimizing the sum. This can sound daunting at first, but you'll discover it is straightforward when we explore it step-by-step. We can benefit from the least squared error as we can predict the outcomes based on existing data set and clear outliers in our data. Let's look at the following example. We have these x and y values that represent how many bug fixes software developers solve if they invest some number of hours. So x values represent the hours, and y values represent bug fixes. And we visualize them using a scatter plot. We want to use x to predict y. First, we have to find the regression line of y on x. We can express it with…

Contents