Home » Machine Learning » Know better Linear Regression Technique

Know better Linear Regression Technique

Linear Regression: If you know statistics, you probably have heard of linear regression before. You can think of linear regression as the task of fitting a straight line through a set of points. You can draw a line, and then for each of the data points, measure the vertical distance between the point and the line,  the fitted line would be the one where this sum of distances is as small as possible. read article to Know better Linear Regression Technique.

Regression
Regression analysis is one of the most important fields in statistics and machine learning. There are many regression methods available. 

What Is Regression?
Regression meaning to look for relationships among different many variables.

  • For example: you can examine several employees of few company and try to understand their salaries depend on the features, such as experience, education, role, city and so on.
  • Similarly, you can try to establish a mathematical dependence of the male and female count based on their age, location, city and so on.

basically, in regression analysis, you usually consider some occurrence of interest and have a number of observations. Each observation has two or more features.

 In other words, you need to find a function that maps some features or variables to others suitably well.

  • The dependent parameters are called the dependent variables, outputs, or responses.
  • The independent parameters are called the independent variables, inputs, or predictors.

The inputs can be continuous, discrete, or even categorical data such as gender, nationality, brand, and so on.

It is a common practice to denote the outputs with 𝑦 and inputs with 𝑥. If there are two or more independent variables, they can be represented as the equation as 𝐱 = (𝑥₁, …, 𝑥ᵣ), where 𝑟 is the number of inputs.

When Linear Regression Technique can be applied?
Normally, you need regression to answer whether some occurrence influences the other or how several variables are related. For example, you can use it to determine if and to what extent the experience or gender impact salaries.

Regression is also useful when you want to do financial and asset forecast a response using a new set of predictors. For example, you could try to predict devices consumption of a datacentres for the next quarter given the type of device, prices and demands.

Regression is used in many different fields: economy, computer science, social sciences, and so on.

Common regression is Linear Regression
Linear regression is probably one of the most important and widely used regression techniques. It’s among the simplest regression methods. One of its main advantages is the ease of interpreting results.


Example of simple linear regression

Implementing simple linear regression, you can typically start with a given set of input-output (𝑥-𝑦) pairs. These pairs are your observations.

The estimated regression function (Red line) has the equation 𝑓(𝑥) = a₀ + a₁𝑥. Your goal is to calculate the optimal values of the predicted weights a₀ and a₁ that minimize SSR and determine the estimated regression function. The value of a₀, al

so called the intercept, shows the point where the estimated regression line crosses the 𝑦 axis. It is the value of the estimated response 𝑓(𝑥) for 𝑥 = 0. The value of a₁ determines the slope of the estimated regression line.

 

The residuals (lines) can be calculated as 𝑦ᵢ – 𝑓(𝐱ᵢ) = 𝑦ᵢ – a₀ – a₁𝑥ᵢ for 𝑖 = 1, …, 𝑛. They are the distances between the green circles and red squares. When you implement linear regression, you are actually trying to minimize these distances for blue circles

Below are the few more chart can be created in tableau, steps wise guide for easy to design.

Gender Bar Chart in Tableau

Bar Chart in Tableau

Butterfly Bar Chart in Tableau