SlideShare a Scribd company logo
1
● https://towardsdatascience.com/machine-learning-simple-linear-regression-wi
th-python-f04ecfdadc13
● https://datatab.net/tutorial/linear-regression
2
Curve / line to the data points
3
What is Regression Analysis?
4
Regression analysis is an important tool for modelling and
analyzing data
Regression analysis is a form of predictive modelling technique which investigates the
relationship between a dependent (target) and independent variable (s) (predictor).
This technique is used for forecasting, time series modelling and finding the causal
effect relationship between the variables.
5
Why do we use Regression Analysis?
6
Let’s say, you want to estimate growth in sales of a company based on current
economic conditions. You have the recent company data which indicates that
the growth in sales is around two and a half times the growth in the economy.
Using this insight, we can predict future sales of the company based on current
& past information.
It indicates the significant relationships between dependent variable and
independent variable.
It indicates the strength of impact of multiple independent variables on a
7
Let’s say, you want to estimate growth in sales of a company based on current
economic conditions. You have the recent company data which indicates that
the growth in sales is around two and a half times the growth in the economy.
Using this insight, we can predict future sales of the company based on current
& past information.
It indicates the significant relationships between dependent variable and
independent variable.
It indicates the strength of impact of multiple independent variables on a
8
Supervised Learning: Regression
(Linear)
9
● There is a linear relationship between
the 2 variables, Input (X) and Output
(Y), of the data it has learnt from.
● Input vs Output Variable
○ Input variable is Independent
Variable
○ Output variable is Dependent
Variable.
Y= aX+b
10
There is a positive linear relationship between TV
advertising costs and Sales. You may also
summarize by saying that spending more on TV
advertising predicts a higher number of sales.
11
● Positive Linear
Relationship
● Negative Linear Relationship
12
Use Cases of Linear Regression
● Prediction of trends and Sales targets
○ To predict how industry is performing or how many sales targets industry
may achieve in the future.
● Price Prediction
○ Using regression to predict the change in price of stock or product.
● Risk Management
○ Using regression to the analysis of Risk Management in the financial and
insurance sector.
13
Assumptions of Linear Regression
14
Assumptions of Linear Regression: Linearity
● Linearity: It states that the dependent variable Y should be linearly related to
independent variables. This assumption can be checked by plotting a scatter
plot between both variables.
15
Assumptions of Linear Regression: Normality
● Normality: The X and Y variables should be normally distributed. Histograms,
KDE plots, Q-Q plots can be used to check the Normality assumption.
16
Assumptions of Linear Regression: Homoscedasticity
● Homoscedasticity: The variance of the error
terms should be constant i.e the spread of
residuals should be constant for all values of
X. This assumption can be checked by
plotting a residual plot.
○ If the assumption is violated then the points
will form a funnel shape otherwise they will
17
Independence/No Multicollinearity:
● The variables should be independent
of each other i.e no correlation
should be there between the
independent variables.
● To check the assumption, we can use
a correlation matrix or VIF score. If
the VIF score is greater than 5 then
the variables are highly correlated.
● Here (in Image), a high correlation is
present between x5 and x6 variables.
18
The error terms should be normally distributed.
● Q-Q plots and Histograms can be used to check the distribution of error terms.
19
No Autocorrelation:
● The error terms should be independent of each other. Autocorrelation can be
tested using the Durbin Watson test. The null hypothesis assumes that there is
no autocorrelation. The value of the test lies between 0 to 4. If the value of the
test is 2 then there is no autocorrelation.
20
Performance Evaluation of Regression
The performance of the regression model can be evaluated by using
various metrics like MAE, MAPE, RMSE, R-squared etc.
21
Performance Evaluation of Regression
● Mean Absolute Error (MAE)
● Mean Absolute Percentage Error (MAPE)
● Root Mean Square Error (RMSE)
● R-squared values
● Adjusted R-squared values
22
Root Mean Square Error (RMSE)
● RMSE calculates the square root average of the sum of the squared
difference between the actual and the predicted values.
23
Thank You.
24

More Related Content

PPTX
Stat 1 - 13 Correlation Linear Regression.pptx
PPTX
Linear regression aims to find the "best-fit" linear line
PDF
Chapter 13 (1).pdf
PPT
simple linear regression and correlation statistics course
PDF
Unit---5.pdf of ba in srcc du gst before exam
PPTX
Applications of regression analysis - Measurement of validity of relationship
PPT
Chap013.ppt
DOCX
Copyright© Dorling Kinde.docx
Stat 1 - 13 Correlation Linear Regression.pptx
Linear regression aims to find the "best-fit" linear line
Chapter 13 (1).pdf
simple linear regression and correlation statistics course
Unit---5.pdf of ba in srcc du gst before exam
Applications of regression analysis - Measurement of validity of relationship
Chap013.ppt
Copyright© Dorling Kinde.docx

Similar to Regression Analysis in Machine Learning.pptx (20)

DOCX
Copyright© Dorling Kinde.docx
PPTX
Forecasting Using the Predictive Analytics
PPTX
Detail Study of the concept of Regression model.pptx
PPTX
Understanding Simple Regression_ Concepts and Applications.pptx
PPTX
logisticregression-230216130238-583bdb9a.pptx
PPTX
Week5-TH [Autosaved].pptx Staatistics Stab22
PDF
Atharva Joshi's Presentation on Regression.pdf
PPTX
Linear regression
PPTX
Logistic Regression.pptx
PPT
Chap013.ppt
PDF
Correlation 2
DOCX
The future is uncertain. Some events do have a very small probabil.docx
PPTX
Hy2208 Final
PDF
Hy2208 final
PPTX
Correlation and Regression Analysis_ Understanding Relationships_AI PPT Maker...
PDF
PPTX
manecohuhuhuhubasicEstimation-1.pptx
PPTX
Atharva_Joshis_Presentation_on_Regression.pptx
PDF
Conducting Regression Analysis Using SPSS: A Hands-On Guide with
PPTX
Demand estimation and forecasting
Copyright© Dorling Kinde.docx
Forecasting Using the Predictive Analytics
Detail Study of the concept of Regression model.pptx
Understanding Simple Regression_ Concepts and Applications.pptx
logisticregression-230216130238-583bdb9a.pptx
Week5-TH [Autosaved].pptx Staatistics Stab22
Atharva Joshi's Presentation on Regression.pdf
Linear regression
Logistic Regression.pptx
Chap013.ppt
Correlation 2
The future is uncertain. Some events do have a very small probabil.docx
Hy2208 Final
Hy2208 final
Correlation and Regression Analysis_ Understanding Relationships_AI PPT Maker...
manecohuhuhuhubasicEstimation-1.pptx
Atharva_Joshis_Presentation_on_Regression.pptx
Conducting Regression Analysis Using SPSS: A Hands-On Guide with
Demand estimation and forecasting
Ad

More from Gobi Ramasamy (7)

PPTX
Importing Library for Self learning in ML
PPTX
Regression Analysis in Machine Learning for self learning
PPTX
Regression Analysis for Machine Learning
PPTX
Importing Library in Machine Learning for self learn
PPTX
Importing Library in Machine Learning .pptx
PPTX
Regression Analysis in Machine Learning .pptx
PPTX
Introduction to Machine Learning for importing library in colab.pptx
Importing Library for Self learning in ML
Regression Analysis in Machine Learning for self learning
Regression Analysis for Machine Learning
Importing Library in Machine Learning for self learn
Importing Library in Machine Learning .pptx
Regression Analysis in Machine Learning .pptx
Introduction to Machine Learning for importing library in colab.pptx
Ad

Recently uploaded (20)

PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
advance database management system book.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
RMMM.pdf make it easy to upload and study
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Weekly quiz Compilation Jan -July 25.pdf
Final Presentation General Medicine 03-08-2024.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
History, Philosophy and sociology of education (1).pptx
Orientation - ARALprogram of Deped to the Parents.pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
advance database management system book.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Unit 4 Skeletal System.ppt.pptxopresentatiom
Chinmaya Tiranga quiz Grand Finale.pdf
What if we spent less time fighting change, and more time building what’s rig...
RMMM.pdf make it easy to upload and study
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS

Regression Analysis in Machine Learning.pptx

  • 2. 2 Curve / line to the data points
  • 4. 4 Regression analysis is an important tool for modelling and analyzing data Regression analysis is a form of predictive modelling technique which investigates the relationship between a dependent (target) and independent variable (s) (predictor). This technique is used for forecasting, time series modelling and finding the causal effect relationship between the variables.
  • 5. 5 Why do we use Regression Analysis?
  • 6. 6 Let’s say, you want to estimate growth in sales of a company based on current economic conditions. You have the recent company data which indicates that the growth in sales is around two and a half times the growth in the economy. Using this insight, we can predict future sales of the company based on current & past information. It indicates the significant relationships between dependent variable and independent variable. It indicates the strength of impact of multiple independent variables on a
  • 7. 7 Let’s say, you want to estimate growth in sales of a company based on current economic conditions. You have the recent company data which indicates that the growth in sales is around two and a half times the growth in the economy. Using this insight, we can predict future sales of the company based on current & past information. It indicates the significant relationships between dependent variable and independent variable. It indicates the strength of impact of multiple independent variables on a
  • 9. 9 ● There is a linear relationship between the 2 variables, Input (X) and Output (Y), of the data it has learnt from. ● Input vs Output Variable ○ Input variable is Independent Variable ○ Output variable is Dependent Variable. Y= aX+b
  • 10. 10 There is a positive linear relationship between TV advertising costs and Sales. You may also summarize by saying that spending more on TV advertising predicts a higher number of sales.
  • 11. 11 ● Positive Linear Relationship ● Negative Linear Relationship
  • 12. 12 Use Cases of Linear Regression ● Prediction of trends and Sales targets ○ To predict how industry is performing or how many sales targets industry may achieve in the future. ● Price Prediction ○ Using regression to predict the change in price of stock or product. ● Risk Management ○ Using regression to the analysis of Risk Management in the financial and insurance sector.
  • 14. 14 Assumptions of Linear Regression: Linearity ● Linearity: It states that the dependent variable Y should be linearly related to independent variables. This assumption can be checked by plotting a scatter plot between both variables.
  • 15. 15 Assumptions of Linear Regression: Normality ● Normality: The X and Y variables should be normally distributed. Histograms, KDE plots, Q-Q plots can be used to check the Normality assumption.
  • 16. 16 Assumptions of Linear Regression: Homoscedasticity ● Homoscedasticity: The variance of the error terms should be constant i.e the spread of residuals should be constant for all values of X. This assumption can be checked by plotting a residual plot. ○ If the assumption is violated then the points will form a funnel shape otherwise they will
  • 17. 17 Independence/No Multicollinearity: ● The variables should be independent of each other i.e no correlation should be there between the independent variables. ● To check the assumption, we can use a correlation matrix or VIF score. If the VIF score is greater than 5 then the variables are highly correlated. ● Here (in Image), a high correlation is present between x5 and x6 variables.
  • 18. 18 The error terms should be normally distributed. ● Q-Q plots and Histograms can be used to check the distribution of error terms.
  • 19. 19 No Autocorrelation: ● The error terms should be independent of each other. Autocorrelation can be tested using the Durbin Watson test. The null hypothesis assumes that there is no autocorrelation. The value of the test lies between 0 to 4. If the value of the test is 2 then there is no autocorrelation.
  • 20. 20 Performance Evaluation of Regression The performance of the regression model can be evaluated by using various metrics like MAE, MAPE, RMSE, R-squared etc.
  • 21. 21 Performance Evaluation of Regression ● Mean Absolute Error (MAE) ● Mean Absolute Percentage Error (MAPE) ● Root Mean Square Error (RMSE) ● R-squared values ● Adjusted R-squared values
  • 22. 22 Root Mean Square Error (RMSE) ● RMSE calculates the square root average of the sum of the squared difference between the actual and the predicted values.
  • 24. 24