Skip to content

Commit

Permalink
Update 05-Regression-assumptions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qualiaMachine authored Aug 6, 2024
1 parent 2044a11 commit 7fa2c35
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions _episodes/05-Regression-assumptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,9 +633,12 @@ def calc_print_VIF(X):
print(vif)
```


The variance_inflation_factor() function expects a constant column to code for each model's y-intercept. We will add this constant before calculating VIF scores.
```python
calc_print_VIF(X_good)
# Add constant to the dataframe for VIF calculation
X_with_const = add_constant(X_good)
# Calc VIF scores
calc_print_VIF(X_with_const)
```

Variable VIF
Expand Down

0 comments on commit 7fa2c35

Please sign in to comment.