You are on page 1of 18

Regression Analysis in Data mining

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Objectives
 What is Regression?  Salary prediction using python

 Use case of Regression  Uber data analysis to predict the cab fare

 Types of Regression

 What is simple Linear Regression?

 What is Multiple Linear Regression?

 Understand regression

 Implement regression using Python

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is Regression?
Regression is a technique that predicts the value of variable ‘y’ based on the values of variable ‘x’.
For example,

If you think there is a relationship between two things regression


would help confirm it!

Note: As the temperature drops sale of jacket increases.

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Use case of Regression

Note: As the temperature increases, number of cones sold at ice cream stores also increases.

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Types Of Regression
There are various types of Regression like:

● Linear Regression

● Logistic Regression etc.

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is Linear Regression?

● Linear regression is a type of supervised algorithm.

● Used for finding linear relationship between


independent and dependent variable

● Finds relationship between two or more continuous


variables

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is Multiple Linear Regression?
Multiple regression is nothing but an extension of linear regression. It helps to find the relationship
between more than two variables. As we know in simple linear relation has one predictor and one
response variable, but in the case of multiple regression we have more than one predictor variable
and one response variable.

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Types Of Linear Regression

SIMPLE LINEAR REGRESSION MULTIPLE LINEAR REGRESSION

Single Predictor Multiple Predictor

X1
X Y X2
X3
Y
X4
X5
X6

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Types Of Linear Regression

SIMPLE LINEAR REGRESSION MULTIPLE LINEAR REGRESSION

Equation Equation

y= mx+c y = m1 x1+m2 x2+m3x3 +..c

Independent Variables

Dependant Variable

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Understand simple Linear Regression
Y
Dependent Variable

Independent Variable
X
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Understand simple Linear Regression with observations
Y
Dependent Variable

Observation

X
Independent Variable
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Understand simple Linear Regression with observations
Y
Dependent Variable

X
Independent Variable
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Understand simple Linear Regression with observations
Y
Regression Line
Dependent Variable

X
Independent Variable
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Understand simple Linear Regression with observations
Y
Dependent Variable

Regression Line
error
Estimated Value

error Goal: Minimize the error


(distance between actual
and estimated value)

X
Independent Variable
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Demo: Implement Linear regression
using Python

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Demo: Salary prediction using
Python

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Demo: Uber data analysis to predict
the cab fare using Python

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Thank you

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited

You might also like