Skip to content

Commit 5fc12d8

Browse files
committed
Update 03-Classification.qmd
1 parent 3901cbf commit 5fc12d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

03-Classification.qmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ where the left hand side is called the **log odds** or the **logit**. From explo
202202
In linear regression, we can check the linearity between response and multiple predictors by calculating the **residual** and compare it to the predicted response. There is a similar analysis in logistic regression: **residual** **deviance.**
203203

204204
```{python}
205+
import statsmodels.api as sm
206+
205207
model = sm.Logit(y_train, X_train)
206208
results = model.fit()
207209
@@ -237,7 +239,6 @@ On the left hand side of the equationis the **Odds** of having Hypertension.
237239
$\beta_0$ is a parameter describing \_\_, and $\beta_1$ is a parameter describing \_\_\_
238240

239241
```{python}
240-
import statsmodels.api as sm
241242
242243
logit_model = sm.Logit(y_train, X_train).fit()
243244

0 commit comments

Comments
 (0)