def poly(X):
areas = ['LotArea', 'TotalBsmtSF', 'GrLivArea', 'GarageArea', 'BsmtUnfSF']
# t = [s for s in X.axes[1].get_values() if s not in areas]
t = chain(qu_list.axes[1].get_values(),
['OverallQual', 'OverallCond', 'ExterQual', 'ExterCond', 'BsmtCond', 'GarageQual', 'GarageCond',
'KitchenQual', 'HeatingQC', 'bad_heating', 'MasVnrType_Any', 'SaleCondition_PriceDown', 'Reconstruct',
'ReconstructAfterBuy', 'Build.eq.Buy'])
for a, t in product(areas, t):
x = X.loc[:, [a, t]].prod(1)
x.name = a + '_' + t
yield x
linearRegression_lassoRegularization.py 文件源码
python
阅读 43
收藏 0
点赞 0
评论 0
评论列表
文章目录