Linear Regression Machine Learning Algorithm

Data in itself is merely a number, so is age, yet we make a big fuss about it.No matter how old you are, you are just one step away from Victory.

By now we are sure you are aware of the basics of Machine Learning. Now taking this a step further, now you would have to familiarize yourself with the types of Machine learning Algorithm that are commonly used.

The following are the most popular Machine Learning Algorithms.

Linear Regression Algorithm

Logistic Regression Algorithm

Decision Tress Algorithm

Random Forest Algorithm

K-Nearest Neighbors Algorithm

In this post we shall understand what is Linear Regression.

In understanding Linear Regression Model,  we need to foremost understand that there are two set objectives to look for.

Objective 1

Establish a relationship between  an Independent Variable [X] and a Dependent Variable [Y].

Two Relationships are possible between these variables.

  • as X increases, Y also increases
  • as X increases, Y decreases

The relationships are measured using Statistical tools. The following are some of the examples where a Linear Regression model can be thought off and applied.

  • Tall muscular men and dating chances
  • Rich men and dating chances
  • High income and traveling
  • High income and education
  • Sleep and Productivity
  • Alcohol and creativity
  • Beautiful women and career growth
  • Race and Poverty
  • Ethnicity and Poverty
  • Junk food and Obesity
  • Exercise and Motivation
  • Exercise and Brain health
  • Education and affluence

Objective 2

Once we are through with finding some Statistically significant relationship between the two variables, we then move on to what is called as Forecasting.

So what is Forecasting?

Using the Relationship [Objective 1] we now have the ability to predict the outcome of an unobserved data.

Example to understand Forecasting

If Warriors [a basketball team] have won all of their past 5 games for the first season, then we could easily forecast the average scores that the team would achieve in their next 5 games, without observing the data.

If an employee is coming to office consecutively for 10 days with average delays being around 12 minutes, then we would be able to forecast his/her time to work for the next 10 days, without observing the data.

The Mathematical in Linear Regression Model

We all know the linear equation model,

y = m x + c

m is called the slope of the equation

c is called the constant

x is the Independent variable, that would mean, x, is directly responsible to the values that y receive.

y is the Dependent variable, that would mean, the values of y is the direct result to the values the x, takes.

The Statistics way of using Linear Equation model

Let us consider a simple regression graph.

The understanding here would be the regression line is 6 units above the horizontal axis. The slope here is 2 units, and that would mean for every 1 unit increase in x, y will increase twice as much.

When Real Data is plotted, its a different story altogether

If we are to plot real data, it would be clearly observed that the data would not be a perfectly on the linear line. Instead, it would be all around the linear line.

If we were to draw the linear line we would find that there is a distance between the line and the data items plotted. This distance is referred to as the Error term, and our objective is to minimize the Error term and get the best fit line for our Linear Regression Model.

The idea is to minimize the error term, D

The line that you see above is not the best fit line, and hence the related Linear Regression model may not accurately forecast the data. Thus, we need further refinement.

Thus with Trial and Error, we would be able to achieve the Best fit line. In the subsequent lessons we shall see more related examples on Linear Regression Models.

0 responses on "Linear Regression Machine Learning Algorithm"

Leave a Message

Your email address will not be published. Required fields are marked *

Mathz.org, All rights reserved. SiteLock
error: Content is protected !!