Answers for "vif"

0

vif

vif = pd.DataFrame()
vif['Features'] = X_train.columns
vif['VIF'] = [variance_inflation_factor(X_train.values, i) for i in range(X_train.shape[1])]
vif['VIF'] = round(vif['VIF'], 2)
vif.sort_values(by = 'VIF', ascending = False, inplace = True)
print(vif)
Posted by: Guest on February-26-2021

Python Answers by Framework

Browse Popular Code Answers by Language