5.2 Simple Linear Regression

5.2 Simple Linear Regression

Simple Linear Regression fits a line to the data. The reason it is simple, however, is that it is 2D. This means that the line fitted to the data has only one feature. Obviously, considering the large-scale impact of Machine Learning, we will almost never deal with just one feature. Still, it's a good model to learn how this works and get an intuition for it.

Let's remind ourselves what the equation for a line is:

and are the two variables that change. The first is independent and the second dependent. However, their values do not determine the shape of the model. Instead, the model relates the values of and . and , however, are the two numbers that determine the shape of the model. You may remember that parameters also determine the shape of the model, and so in this particular type of model, and are parametersWe will rename them as  and , so that the model is:

What we are going to try to do now, is to find the optimal values for  and . Our criteria is to make the model the most accurate based on the data. But we'll stop here. First, let's understand some Optimization.

Previous Section

Next Section

Add a page link block here (if there is no next section, delete this column)


Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.