python信用评分卡(附代码,博主录制)
https://etav.github.io/python/vif_factor_python.html
Colinearity is the state where two variables are highly correlated and contain similiar information about the variance within a given dataset. To detect colinearity among variables, simply create a correlation matrix and find variables with large absolute values. In R use the corr
function and in python this can by accomplished by using numpy's corrcoef
function.
Multicolinearity on the other hand is more troublesome to detect because it emerges when three or more variables, which are highly correlated, are included within a model. To make matters worst multicolinearity can emerge even when isolated pairs of variables are not colinear.
A common R function used for testing reg