我正处于模型的降维阶段。我有一个分类列列表,我想找到每列和我的连续SalePrice列之间的相关性。以下是列名列表:
categorical_columns = ['MSSubClass', 'MSZoning', 'LotShape', 'LandContour', 'LotConfig', 'Neighborhood', 'Condition1',
'Condition2', 'BldgType', 'HouseStyle', 'RoofStyle', 'RoofMatl', 'Exterior1st', 'Exterior2nd',
'Foundation', 'Heating', 'Electrical', 'Functional', 'GarageType', 'PavedDrive', 'Fence',
'MiscFeature', 'SaleType', 'SaleCondition', 'Street', 'CentralAir']
因为它是分类的与连续的,所以我读过 ANOVA 是最好的方法,但我以前从未使用过它,也无法在 Python 中找到它的简明实现。我想循环并输出列表中每个元素与SalePrice列之间的相关性。