SlideShare a Scribd company logo
1 of 16
Generalized Linear Models
Types of ML :
Supervised Unsupervised Reinforcement
GLM
Classification
Regression
Response/output/Dependent variable
Categorical (or) discrete
Continuous
Example
• Yes/No
• Survived/Dead
• Lion/Tiger/Cheetah etc.
• 100.70
• 25
• -75.25
-∞ to +∞
Introduction to Generalized Linear Models
• What are GLMs? GLMs are a type of statistical model Techniques.
• Statistical Modeling Techniques: Statistical modeling is a powerful tool for
understanding relationships between variables in data. It involves the development of
mathematical models to describe and predict the behavior of observed phenomena.
• Extension of Linear Models: Generalized Linear Models (GLMs) are an extension of
traditional linear models, offering more flexibility in modeling complex relationships
between variables. While linear models assume a linear relationship between the response
variable and predictors, GLMs relax this assumption by allowing for non-linear
relationships and non-normal error distributions.
Traditional Linear models
• Assumptions: Linear models assume that the
relationship between predictors (x) and the response
variable (y) is linear. This means that a change in the
predictor leads to a proportional change in the
response. Response variable are independent.
• Response Distribution: Linear models typically
assume that the response variable follows a normal
distribution.
• Link Function: Linear models don't involve a link
function. The relationship between predictors and
response is directly modeled through a linear
combination of the predictors 𝑦𝑖 = 𝑏0 + 𝑏1𝑥𝑖
Traditional Linear models
• In the univariate case, linear regression can
be expressed as follows
• The mean is related to the preditor variable
xi by a linear model
• Here, i indicates the index of each sample.
Notice this model assumes normal
distribution for the noise term. The model
can be illustrated as follows
By the three normal PDF (probability density
function) plots, we are trying to show that the
data follow a normal distribution with a fixed
variance.
• Linear model assumptions are not always met in real world data.
• If we would like to apply statistical modeling in real problems, you must know more than traditional
linear models.
• For example, assume you need to predict the number of defect products (Y) with a sensor value (x) as the
explanatory variable. The scatter plot looks like this.
• There are several problems if you try to apply linear
regression for this kind of data.
• The relationship between X and Y does not look linear.
It’s more likely to be exponential.
• The variance of Y does not look constant with regard to
X. Here, the variance of Y seems to increase when X
increases.
• Y, representing product counts, is a discrete variable,
making linear regression inappropriate due to its
assumption of continuous variables and potential for
negative predictions.
• Here, the more proper model you can think of is the
Poisson regression model. Poisson regression is an
example of generalized linear models (GLM).
Linear Models vs Generalized Linear Models
• Linear models and generalized linear models (GLMs) are both frameworks for modeling
relationships between predictors (features) and a response variable, but they differ in their
assumptions and scope.
• linear models are a subset of GLMs.
• GLMs extend the concept of linear models by relaxing assumptions about the distribution of
the response variable and allowing for a wider range of relationships between predictors and
response.
• Unlike traditional linear regression, which assumes the response variable follows a normal
distribution, GLM allows for a broader range of response distributions, such as binomial (for
binary outcomes), Poisson (for count data), or gamma (for non-negative continuous data).
Components of GLMs
There are three components in generalized linear models.
• Systematic Component: The systematic component represents the linear combination of predictor
variables, that influences the mean of the response variable. Linear predictor is just a linear combination
of parameter (b) and explanatory variable (x).
• Link Function: The link function relates the systematic component i.e, linear predictor to the mean of
the response variable. It transforms the linear predictor to ensure that the predicted values lie within the
appropriate range for the response distribution. Examples include the logit link for binary data and the
log link for count data.
• Random Component: This component specifies the probability distribution of the response variable,
which can be from the exponential family, including Gaussian, binomial, Poisson, and gamma
distributions. For example, in a binary logistic regression, the random component models the probability
of success or failure.
Generalized Linear Model
Framework for Generalization
Random Component
Systematic Component
Link Function
Explains the distribution of our
Dependent Variable
Explains Dependent variable as a
Linear combination of
Independent variable
Establishes Relationship
between Random &
Systematic component
Why We Use GLMs
• Flexibility: GLMs offer greater flexibility compared to traditional linear models
• Non-linearity: GLMs allow for non-linear relationships between predictors and the response
variable by incorporating a link function.
• Assumption Relaxation: GLMs relax some of the strict assumptions of linear regression, such as
normality of residuals and constant variance.
• Model Interpretability: GLMs provide interpretable coefficients that represent the effect of each
predictor on the response variable, holding other predictors constant.
• Wide Applicability: GLMs are widely applicable across different domains and types of data. They
can be used for predicting outcomes in fields like healthcare (e.g., predicting disease risk), finance
(e.g., modeling credit risk), and marketing (e.g., predicting customer behavior).
Types of GLMs
• Binary logistic regression
• Poisson regression
• Probit regression
• Linear regression
• Multinomial logistic regression
• Gamma regression
• Negative binomial regression
• Other types (e.g., binomial, ordinal, etc.)
Some of the Generalized Linear Models
 Logistic Regression (Binomial distribution)
• Logit(E(Y)) = mx + b
 Probit Regression
• Probit(E(Y)) = mx + b
 Poisson Regression
• log(E(Y)) = mx + b
 Linear Regression (Normal distribution)
• E(Y) = mx + b
• ɪ(E(Y)) = mx + b
Solve Linear Model Constraint using GLM
Linear regression is also an example of GLM. It just uses identity link function (the linear predictor and
the parameter for the probability distribution are identical) and normal distribution as the probability
distribution.
If you use logit function as the link function and binomial / Bernoulli distribution as the probability distribution, the
model is called logistic regression.
• Normal Distribution
• E(Y) = mx + b
• Binomial Distribution
• E(Y) ≠ mx + b
• E(Y) = emx + b / 1 + emx + b
i.e We cannot explain the prediction as a
Linear combination of Independent variables
We can explain the prediction as a Linear
combination of Independent variables
Link Function
ɪ(E(Y)) = mx + b
Identity Function
Logit(E(Y)) = mx + b
Logit Function
Linear Modelling technique for Regression
Linear Modelling technique for Classification
Applications of GLMs
• Biomedical research (clinical trials, epidemiology)
• Finance (risk modeling, insurance)
• Marketing (customer churn prediction, response modeling)
• Ecology (species distribution modeling)
• Any other relevant fields
Disadvantages of GLMs
• Limited Scope of Link Functions: The choice of link function in GLMs can significantly impact model
performance. However, the set of available link functions is limited
• Sensitivity to Outliers: Like linear regression, GLMs can be sensitive to outliers, especially when the
response variable distribution is not symmetric or has heavy tails.
• Assumption of Independence: GLMs assume that observations are independent of each other, which
may not hold in longitudinal or clustered data where observations within groups are correlated.
• Difficulty in Model Interpretation for Non-linear Relationships: While GLMs can capture non-linear
relationships through the link function, interpreting the effects of predictors on the response variable
becomes more challenging as the relationship becomes more complex.
• Limited Handling of Missing Data: GLMs typically require complete data for modeling, and missing
values in predictors or the response variable may need to be handled through imputation or exclusion.
Thank You

More Related Content

Similar to GLMs.pptx

Logistic Regression power point presentation.pptx
Logistic Regression power point presentation.pptxLogistic Regression power point presentation.pptx
Logistic Regression power point presentation.pptxharshasawa2003
 
Logit and Probit and Tobit model: Basic Introduction
Logit and Probit  and Tobit model: Basic IntroductionLogit and Probit  and Tobit model: Basic Introduction
Logit and Probit and Tobit model: Basic IntroductionRabeesh Verma
 
Data Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVAData Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVADerek Kane
 
Supervised Learning.pdf
Supervised Learning.pdfSupervised Learning.pdf
Supervised Learning.pdfgadissaassefa
 
ders 8 Quantile-Regression.ppt
ders 8 Quantile-Regression.pptders 8 Quantile-Regression.ppt
ders 8 Quantile-Regression.pptErgin Akalpler
 
Multinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisMultinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisHARISH Kumar H R
 
Ch_17_Wooldridge_6e_PPT_Updated.pdf.pdf
Ch_17_Wooldridge_6e_PPT_Updated.pdf.pdfCh_17_Wooldridge_6e_PPT_Updated.pdf.pdf
Ch_17_Wooldridge_6e_PPT_Updated.pdf.pdfROBERTOENRIQUEGARCAA1
 
Introduction to Limited Dependent variable
Introduction to Limited Dependent variableIntroduction to Limited Dependent variable
Introduction to Limited Dependent variableAshok Dsouza
 
HRUG - Linear regression with R
HRUG - Linear regression with RHRUG - Linear regression with R
HRUG - Linear regression with Regoodwintx
 
Predicating continuous variables-1.pptx
Predicating continuous  variables-1.pptxPredicating continuous  variables-1.pptx
Predicating continuous variables-1.pptxluckyanirudhsai
 
Logistic Regression in machine learning.docx
Logistic Regression in machine learning.docxLogistic Regression in machine learning.docx
Logistic Regression in machine learning.docxAbhaBansal8
 

Similar to GLMs.pptx (20)

Logistic Regression power point presentation.pptx
Logistic Regression power point presentation.pptxLogistic Regression power point presentation.pptx
Logistic Regression power point presentation.pptx
 
Matlab:Regression
Matlab:RegressionMatlab:Regression
Matlab:Regression
 
Matlab: Regression
Matlab: RegressionMatlab: Regression
Matlab: Regression
 
Logit and Probit and Tobit model: Basic Introduction
Logit and Probit  and Tobit model: Basic IntroductionLogit and Probit  and Tobit model: Basic Introduction
Logit and Probit and Tobit model: Basic Introduction
 
Data Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVAData Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVA
 
MF Presentation.pptx
MF Presentation.pptxMF Presentation.pptx
MF Presentation.pptx
 
Supervised Learning.pdf
Supervised Learning.pdfSupervised Learning.pdf
Supervised Learning.pdf
 
Logistic Regression Analysis
Logistic Regression AnalysisLogistic Regression Analysis
Logistic Regression Analysis
 
ders 8 Quantile-Regression.ppt
ders 8 Quantile-Regression.pptders 8 Quantile-Regression.ppt
ders 8 Quantile-Regression.ppt
 
Glm
GlmGlm
Glm
 
Multinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisMultinomial Logistic Regression Analysis
Multinomial Logistic Regression Analysis
 
Ch_17_Wooldridge_6e_PPT_Updated.pdf.pdf
Ch_17_Wooldridge_6e_PPT_Updated.pdf.pdfCh_17_Wooldridge_6e_PPT_Updated.pdf.pdf
Ch_17_Wooldridge_6e_PPT_Updated.pdf.pdf
 
Introduction to Limited Dependent variable
Introduction to Limited Dependent variableIntroduction to Limited Dependent variable
Introduction to Limited Dependent variable
 
Modelo Generalizado
Modelo GeneralizadoModelo Generalizado
Modelo Generalizado
 
CH3.pdf
CH3.pdfCH3.pdf
CH3.pdf
 
HRUG - Linear regression with R
HRUG - Linear regression with RHRUG - Linear regression with R
HRUG - Linear regression with R
 
Predicating continuous variables-1.pptx
Predicating continuous  variables-1.pptxPredicating continuous  variables-1.pptx
Predicating continuous variables-1.pptx
 
Statistics Refresher.pdf
Statistics Refresher.pdfStatistics Refresher.pdf
Statistics Refresher.pdf
 
Logistic Regression in machine learning.docx
Logistic Regression in machine learning.docxLogistic Regression in machine learning.docx
Logistic Regression in machine learning.docx
 
Econometrics chapter 8
Econometrics chapter 8Econometrics chapter 8
Econometrics chapter 8
 

Recently uploaded

代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Delhi Call girls
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 

Recently uploaded (20)

代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 

GLMs.pptx

  • 2. Types of ML : Supervised Unsupervised Reinforcement GLM Classification Regression Response/output/Dependent variable Categorical (or) discrete Continuous Example • Yes/No • Survived/Dead • Lion/Tiger/Cheetah etc. • 100.70 • 25 • -75.25 -∞ to +∞
  • 3. Introduction to Generalized Linear Models • What are GLMs? GLMs are a type of statistical model Techniques. • Statistical Modeling Techniques: Statistical modeling is a powerful tool for understanding relationships between variables in data. It involves the development of mathematical models to describe and predict the behavior of observed phenomena. • Extension of Linear Models: Generalized Linear Models (GLMs) are an extension of traditional linear models, offering more flexibility in modeling complex relationships between variables. While linear models assume a linear relationship between the response variable and predictors, GLMs relax this assumption by allowing for non-linear relationships and non-normal error distributions.
  • 4. Traditional Linear models • Assumptions: Linear models assume that the relationship between predictors (x) and the response variable (y) is linear. This means that a change in the predictor leads to a proportional change in the response. Response variable are independent. • Response Distribution: Linear models typically assume that the response variable follows a normal distribution. • Link Function: Linear models don't involve a link function. The relationship between predictors and response is directly modeled through a linear combination of the predictors 𝑦𝑖 = 𝑏0 + 𝑏1𝑥𝑖
  • 5. Traditional Linear models • In the univariate case, linear regression can be expressed as follows • The mean is related to the preditor variable xi by a linear model • Here, i indicates the index of each sample. Notice this model assumes normal distribution for the noise term. The model can be illustrated as follows By the three normal PDF (probability density function) plots, we are trying to show that the data follow a normal distribution with a fixed variance.
  • 6. • Linear model assumptions are not always met in real world data. • If we would like to apply statistical modeling in real problems, you must know more than traditional linear models. • For example, assume you need to predict the number of defect products (Y) with a sensor value (x) as the explanatory variable. The scatter plot looks like this. • There are several problems if you try to apply linear regression for this kind of data. • The relationship between X and Y does not look linear. It’s more likely to be exponential. • The variance of Y does not look constant with regard to X. Here, the variance of Y seems to increase when X increases. • Y, representing product counts, is a discrete variable, making linear regression inappropriate due to its assumption of continuous variables and potential for negative predictions. • Here, the more proper model you can think of is the Poisson regression model. Poisson regression is an example of generalized linear models (GLM).
  • 7. Linear Models vs Generalized Linear Models • Linear models and generalized linear models (GLMs) are both frameworks for modeling relationships between predictors (features) and a response variable, but they differ in their assumptions and scope. • linear models are a subset of GLMs. • GLMs extend the concept of linear models by relaxing assumptions about the distribution of the response variable and allowing for a wider range of relationships between predictors and response. • Unlike traditional linear regression, which assumes the response variable follows a normal distribution, GLM allows for a broader range of response distributions, such as binomial (for binary outcomes), Poisson (for count data), or gamma (for non-negative continuous data).
  • 8. Components of GLMs There are three components in generalized linear models. • Systematic Component: The systematic component represents the linear combination of predictor variables, that influences the mean of the response variable. Linear predictor is just a linear combination of parameter (b) and explanatory variable (x). • Link Function: The link function relates the systematic component i.e, linear predictor to the mean of the response variable. It transforms the linear predictor to ensure that the predicted values lie within the appropriate range for the response distribution. Examples include the logit link for binary data and the log link for count data. • Random Component: This component specifies the probability distribution of the response variable, which can be from the exponential family, including Gaussian, binomial, Poisson, and gamma distributions. For example, in a binary logistic regression, the random component models the probability of success or failure.
  • 9. Generalized Linear Model Framework for Generalization Random Component Systematic Component Link Function Explains the distribution of our Dependent Variable Explains Dependent variable as a Linear combination of Independent variable Establishes Relationship between Random & Systematic component
  • 10. Why We Use GLMs • Flexibility: GLMs offer greater flexibility compared to traditional linear models • Non-linearity: GLMs allow for non-linear relationships between predictors and the response variable by incorporating a link function. • Assumption Relaxation: GLMs relax some of the strict assumptions of linear regression, such as normality of residuals and constant variance. • Model Interpretability: GLMs provide interpretable coefficients that represent the effect of each predictor on the response variable, holding other predictors constant. • Wide Applicability: GLMs are widely applicable across different domains and types of data. They can be used for predicting outcomes in fields like healthcare (e.g., predicting disease risk), finance (e.g., modeling credit risk), and marketing (e.g., predicting customer behavior).
  • 11. Types of GLMs • Binary logistic regression • Poisson regression • Probit regression • Linear regression • Multinomial logistic regression • Gamma regression • Negative binomial regression • Other types (e.g., binomial, ordinal, etc.)
  • 12. Some of the Generalized Linear Models  Logistic Regression (Binomial distribution) • Logit(E(Y)) = mx + b  Probit Regression • Probit(E(Y)) = mx + b  Poisson Regression • log(E(Y)) = mx + b  Linear Regression (Normal distribution) • E(Y) = mx + b • ɪ(E(Y)) = mx + b
  • 13. Solve Linear Model Constraint using GLM Linear regression is also an example of GLM. It just uses identity link function (the linear predictor and the parameter for the probability distribution are identical) and normal distribution as the probability distribution. If you use logit function as the link function and binomial / Bernoulli distribution as the probability distribution, the model is called logistic regression. • Normal Distribution • E(Y) = mx + b • Binomial Distribution • E(Y) ≠ mx + b • E(Y) = emx + b / 1 + emx + b i.e We cannot explain the prediction as a Linear combination of Independent variables We can explain the prediction as a Linear combination of Independent variables Link Function ɪ(E(Y)) = mx + b Identity Function Logit(E(Y)) = mx + b Logit Function Linear Modelling technique for Regression Linear Modelling technique for Classification
  • 14. Applications of GLMs • Biomedical research (clinical trials, epidemiology) • Finance (risk modeling, insurance) • Marketing (customer churn prediction, response modeling) • Ecology (species distribution modeling) • Any other relevant fields
  • 15. Disadvantages of GLMs • Limited Scope of Link Functions: The choice of link function in GLMs can significantly impact model performance. However, the set of available link functions is limited • Sensitivity to Outliers: Like linear regression, GLMs can be sensitive to outliers, especially when the response variable distribution is not symmetric or has heavy tails. • Assumption of Independence: GLMs assume that observations are independent of each other, which may not hold in longitudinal or clustered data where observations within groups are correlated. • Difficulty in Model Interpretation for Non-linear Relationships: While GLMs can capture non-linear relationships through the link function, interpreting the effects of predictors on the response variable becomes more challenging as the relationship becomes more complex. • Limited Handling of Missing Data: GLMs typically require complete data for modeling, and missing values in predictors or the response variable may need to be handled through imputation or exclusion.