variance_inflation_factor¶
In [ ]:
variance_inflation_factor(vdf: vDataFrame,
X: list,
X_idx: int = None,)
Computes the variance inflation factor (VIF) which can be used to detect multicollinearity in an ordinary least squares (OLS) regression analysis.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
vdf | vDataFrame | ❌ | input vDataFrame. |
X | list | ❌ | Input Variables. |
X_idx | int | ✓ | Index of the exogenous variable in X. If left to None, a tablesample will be returned with all the variables VIF. |
In [14]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
from verticapy.stats import variance_inflation_factor
variance_inflation_factor(titanic,
["age", "fare", "pclass"],
0)
Out[14]:
In [13]:
from verticapy.stats import variance_inflation_factor
variance_inflation_factor(titanic,
["age", "fare", "pclass"],)
Out[13]:
