Machine Learning 102 —Linear Regression, Ordinary Least Squares (OLS), Correlation and Analysis of Variance(ANOVA)

Saahil Sharma
1 min readJul 5, 2017

--

Linear Regression is an approach to determine a relationship between the input/independent variable ‘X’ and the Target/Dependent Variable ‘Y’.

Keep in mind the equation y = m1x1 + m2x2 + C where ‘C’ is the constant.

OLS or Ordinary Least Squares is a method in Linear Regression for estimating the unknown parameters by creating a model which will minimize the sum of the squared errors between the observed data and the predicted one.

Ordinary Least Squares on Linear Regression Line

For Ex., Consider the above picture. We have a scatter plot where each dot represents the data points. using linear regression model, a straight line is fitted. The objective here is to minimize the error between the data points (observed) and the points on the line (Predicted). Hence, keeping this in mind, we will calculate the sum of the vertical distances (shown as squares). The smaller the distance, the better model fits the data.

--

--