Generalized Linear Models di Python
Ita Cirovic Donev
Data Science Consultant
Contoh:
$$ P(y)=\frac{\lambda^ye^{-\lambda}}{y!} $$

import seaborn as sns
sns.distplot('y')
Variabel respons $$ y \sim Poisson(\lambda) $$
Rata-rata respons $$ E(y)=\lambda $$
Model regresi Poisson $$ log(\lambda)=\beta_0+\beta_1x_1 $$
import statsmodels.api as sm
from statsmodels.formula.api import glm
glm('y ~ x',
data = my_data,
family = sm.families.Poisson())
Generalized Linear Models di Python