1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Generalized Linear Models in Python

Connected

अभ्यास

Fitting a Poisson regression

Continuing with the crab dataset you will fit your first Poisson regression model in this exercise.

The crab dataset has been preloaded in the workspace.

निर्देश

100 XP
  • Import statsmodels.api library as sm.
  • Import glm from statsmodels.formula.api.
  • Using Poisson() for the response distribution fit the Poisson regression with satas the response and weight for the explanatory variable.
  • Display the model results using .summary().