我们是否总是需要为单热编码删除一列以防止多重共线性? 在这里的解决方案(https://www.kaggle.com/omarelgabry/titanic/a-journey-through-titanic/comments#138896)中提到
@Kevin Chang You need to delete one column of the dummy variables to avoid the state of Multicollinearity. It's a state of very high correlations among the columns(independent variables); meaning that one can be predicted from the others. It is therefore, a type of disturbance in the data, and if present in the data the statistical conclusions made about the data may not be reliable.
在此处的解决方案中,没有考虑到多重共线性 https://www.kaggle.com/sharmasanthosh/allstate-claims-severity/exploratory-study-on-ml-algorithms
我可以知道这是必须的吗,或者在什么情况下我们需要满足它?
最佳答案
如果我必须回答您的问题“我们是否总是需要删除单热编码的列以防止多重共线性?”
,答案是肯定的。
防止多重共线性的常用方法是从模型中删除高度相关的预测变量。如果您有两个或更多具有高 VIF 的因子,请从模型中删除一个。因为它们提供了冗余信息,所以移除其中一个相关因素通常不会降低 R 平方。
或者您可以使用偏最小二乘回归 (PLS) 或主成分分析,这些回归方法可将预测变量的数量减少到更小的不相关成分集。
关于pandas - 单热编码的多重共线性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42224430/