-
Kaggle房价预测
<<<<<<< HEAD =======
通过数据挖掘、可视化、清洗的方法获取房产数据集中与房价有关的特征,建立机器学习模型,多个模型拟合得到最优参数,实现对房产价格的预测。
- data:相关数据集
- info.txt:有关参数的介绍
- feature_show:可视化
- feature_predict:预测
count 1460.000000
mean 180921.195890
std 79442.502883
min 34900.000000
25% 129975.000000
50% 163000.000000
75% 214000.000000
max 755000.000000
Name: SalePrice, dtype: float64
- 方法一
select_dtypes(include=[np.number])
- 方法二
features = pd.concat([train, test],keys=['train','test'])
numeric_feats = features.dtypes[features.dtypes!="object"].index
categorical_feats = features.dtypes[features.dtypes=="object"].index
- 通过
DataFrame.corr()
方法显示列之间的相关性(或关系),可以用来研究特征与目标变量的亲密程度
相关性前5
OverallQual 0.790982
GrLivArea 0.708624
GarageCars 0.640409
GarageArea 0.623431
TotalBsmtSF 0.613581
Name: SalePrice, dtype: float64
相关性-5
YrSold -0.028923
OverallCond -0.077856
MSSubClass -0.084284
EnclosedPorch -0.128578
KitchenAbvGr -0.135907
Name: SalePrice, dtype: float64
- Ridge模型
- Lasso模型
e0592b5021ed3cdf9552d6360947995e0531912c