How to deal with co-linearity of dummy variables for linear regression?
问题 I am using scikit-learn LogisticRegression on a dataset of household characteristics and trying to understand how to prepare the independent variables. I have created binary dummy variables in place of categorical variables. e.g. The variable DWELLING_TYPE which had 3 possible values DetachedHouse , SemiDetached and Apartment has been replaced with 3 binary variables DWELLING_TYPE_DetachedHouse , DWELLING_TYPE_SemiDetached and DWELLING_TYPE_Apartment that each has the value 1 or 0`. Clearly