Generalized Linear Models in Python
Extend your regression toolbox with the logistic and Poisson models and learn to train, understand, and validate them, as well as to make predictions.
Start Course for Free5 hours16 videos59 exercises10,016 learnersStatement of Accomplishment
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.Training 2 or more people?
Try DataCamp for BusinessLoved by learners at thousands of companies
Course Description
Imagine being able to handle data where the response variable is either binary, count, or approximately normal, all under one single framework. Well, you don't have to imagine. Enter the Generalized Linear Models in Python course! In this course you will extend your regression toolbox with the logistic and Poisson models, by learning how to fit, understand, assess model performance and finally use the model to make predictions on new data. You will practice using data from real world studies such the largest population poisoning in world's history, nesting of horseshoe crabs and counting the bike crossings on the bridges in New York City.
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.- 1
Introduction to GLMs
FreeReview linear models and learn how GLMs are an extension of the linear model given different types of response variables. You will also learn the building blocks of GLMs and the technical process of fitting a GLM in Python.
Going beyond linear regression50 xpApplying linear models50 xpLinear model, a special case of GLM100 xpHow to build a GLM?50 xpData type and distribution family100 xpLinear model and a binary response variable100 xpComparing predicted values100 xpHow to fit a GLM in Python?50 xpModel fitting step-by-step100 xpResults of the model fit using summary()100 xpExtracting parameter estimates100 xp - 2
Modeling Binary Data
This chapter focuses on logistic regression. You'll learn about the structure of binary data, the logit link function, model fitting, as well as how to interpret model coefficients, model inference, and how to assess model performance.
Binary data and logistic regression50 xpCompute odds and probabilities100 xpFit logistic regression100 xpInterpreting coefficients50 xpCoefficients in terms of odds100 xpModel formula50 xpInterpreting logistic model50 xpRate of change in probability100 xpInterpreting model inference50 xpStatistical significance100 xpComputing Wald statistic100 xpConfidence intervals100 xpComputing and describing predictions50 xpVisualize model fit using regplot()100 xpCompute predictions100 xpCompute confusion matrix100 xp - 3
Modeling Count Data
Here you'll learn about Poisson regression, including the discussion on count data, Poisson distribution and the interpretation of the model fit. You'll also learn how to overcome problems with overdispersion. Finally, you'll get hands-on experience with the process of model visualization.
Count data and Poisson distribution50 xpVisualize the response100 xpFitting a Poisson regression100 xpInterpreting model fit50 xpEstimate parameter lambda100 xpInterpret Poisson coefficients100 xpPoisson confidence intervals100 xpThe Problem of Overdispersion50 xpIs the mean equal to the variance?100 xpComputing expected number of counts100 xpChecking for overdispersion100 xpFitting negative binomial100 xpConfidence intervals for negative Binomial model100 xpPlotting a regression model50 xpPlotting data and linear model fit100 xpPlotting fitted values100 xp - 4
Multivariable Logistic Regression
In this final chapter you'll learn how to increase the complexity of your model by adding more than one explanatory variable. You'll practice with the problem of multicollinearity, and with treating categorical and interaction terms in your model.
Multivariable logistic regression50 xpFit a multivariable logistic regression100 xpThe effect of multicollinearity100 xpCompute VIF100 xpComparing models50 xpChecking model fit100 xpCompare two models100 xpDeviance and linear transformation100 xpModel formula50 xpModel matrix for continuous variables100 xpVariable transformation100 xpCoding categorical variables100 xpCategorical and interaction terms50 xpModeling with categorical variable100 xpInteraction terms100 xpCongratulations!50 xp
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.datasets
Well switch due to arsenic poisoningNesting of the female horseshoe crabCredit defaultLevel of salary and years of work experienceMedical costs per person given age and BMIBike crossings in New York Citycollaborators
prerequisites
Introduction to Linear Modeling in PythonIta Cirovic Donev
See MoreData Science consultant
What do other learners have to say?
Join over 15 million learners and start Generalized Linear Models in Python today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.