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
Linear regression
PDF
Linear regression
PPTX
Linear regression aims to find the "best-fit" linear line
PPTX
Artifical Intelligence And Machine Learning Algorithum.pptx
PPTX
Detail Study of the concept of Regression model.pptx
PPTX
Regression Analysis.pptx
PPTX
Regression Analysis Techniques.pptx
PPTX
Linear Regression final-1.pptx thbejnnej
Linear regression
Linear regression
Linear regression aims to find the "best-fit" linear line
Artifical Intelligence And Machine Learning Algorithum.pptx
Detail Study of the concept of Regression model.pptx
Regression Analysis.pptx
Regression Analysis Techniques.pptx
Linear Regression final-1.pptx thbejnnej

Similar to Regression Analysis in Machine Learning for self learning (20)

PPTX
Predictive analytics
PPTX
Regression
PPTX
Linear regression.pptx
PPTX
Linear regression
PPTX
Introduction-to-Linear-Regression-Concepts-Application-and-Interpretation.pptx
PPTX
business Lesson-Linear-Regression-1.pptx
PDF
MachineLearning_Unit-II.FHDGFHJKpptx.pdf
PPTX
unit 3_Predictive Analysis Dr. Neeraj.pptx
PPT
Regression analysis ppt
PPTX
ML-UNIT-IV complete notes download here
PDF
Module-2_ML.pdf
PPTX
MachineLearning_Unit-II.pptxScrum.pptxAgile Model.pptxAgile Model.pptxAgile M...
PPTX
regression analysis presentation slides.
PPTX
Multiple Linear Regression
PPTX
Introduction to Regression . pptx
PDF
Introduction to financial forecasting in investment analysis
PDF
The normal presentation about linear regression in machine learning
PDF
Regression analysis made easy
PPTX
Regression analysis
PPTX
Introduction to Regression Analysis.pptx
Predictive analytics
Regression
Linear regression.pptx
Linear regression
Introduction-to-Linear-Regression-Concepts-Application-and-Interpretation.pptx
business Lesson-Linear-Regression-1.pptx
MachineLearning_Unit-II.FHDGFHJKpptx.pdf
unit 3_Predictive Analysis Dr. Neeraj.pptx
Regression analysis ppt
ML-UNIT-IV complete notes download here
Module-2_ML.pdf
MachineLearning_Unit-II.pptxScrum.pptxAgile Model.pptxAgile Model.pptxAgile M...
regression analysis presentation slides.
Multiple Linear Regression
Introduction to Regression . pptx
Introduction to financial forecasting in investment analysis
The normal presentation about linear regression in machine learning
Regression analysis made easy
Regression analysis
Introduction to Regression Analysis.pptx
Ad

More from Gobi Ramasamy (7)

PPTX
Importing Library for Self learning in ML
PPTX
Regression Analysis for Machine Learning
PPTX
Importing Library in Machine Learning for self learn
PPTX
Regression Analysis in Machine Learning.pptx
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 for Machine Learning
Importing Library in Machine Learning for self learn
Regression Analysis in Machine Learning.pptx
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
PDF
Complications of Minimal Access Surgery at WLH
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Trump Administration's workforce development strategy
PDF
RMMM.pdf make it easy to upload and study
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Lesson notes of climatology university.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
A systematic review of self-coping strategies used by university students to ...
Weekly quiz Compilation Jan -July 25.pdf
Complications of Minimal Access Surgery at WLH
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
Trump Administration's workforce development strategy
RMMM.pdf make it easy to upload and study
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Lesson notes of climatology university.
Final Presentation General Medicine 03-08-2024.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Paper A Mock Exam 9_ Attempt review.pdf.
Practical Manual AGRO-233 Principles and Practices of Natural Farming
UNIT III MENTAL HEALTH NURSING ASSESSMENT
History, Philosophy and sociology of education (1).pptx
Cell Types and Its function , kingdom of life
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
A systematic review of self-coping strategies used by university students to ...

Regression Analysis in Machine Learning for self learning

  • 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