Python में Generalized Linear Models
Ita Cirovic Donev
Data Science Consultant






डेटा टाइप: continuous
डोमेन: $(-\infty,\infty)$
उदाहरण: house price, salary, person's height
Family: Gaussian()
Link: identity
$g(\mu) = \mu = E(y)$
मॉडल = Linear regression

डेटा टाइप: binary
डोमेन: $0,1$
उदाहरण: True/False
Family: Binomial()
Link: logit
मॉडल = Logistic regression

डेटा टाइप: count
डोमेन: $0, 1, 2, ..., \infty$
उदाहरण: number of votes, number of hurricanes
Family: Poisson()
Link: logarithm
मॉडल = Poisson regression
| घनत्व | Link: $\eta=g(\mu)$ | डिफ़ॉल्ट लिंक | glm(family=...) |
|---|---|---|---|
| Normal | $\eta = \mu$ | identity | Gaussian() |
| Poisson | $\eta = log(\mu)$ | logarithm | Poisson() |
| Binomial | $\eta = log[p/(1-p)]$ | logit | Binomial() |
| Gamma | $\eta = 1/\mu$ | inverse | Gamma() |
| Inverse Gaussian | $\eta = 1/\mu^2$ | inverse squared | InverseGaussian() |
Python में Generalized Linear Models