Linear Regression 16 | Python for Logistic Regression
Linear Regression 16 | Python for Logistic Regression

- Import Packages
import pandas as pd
import numpy as np
import statsmodels.api as sm
import statsmodels.formula.api as smf
2. Fit the logistic model
model = smf.glm('y ~ x1 + x2 + x3', data=df, family=sm.families.Binomial()).fit()
model.summary()
maybe more info in the future …