官方文档
参考博客
corr_matrix=housing.corr()
print(corr_matrix)
print(corr_matrix["median_house_value"].sort_values(ascending=False))
pandas.plotting.scatter_matrix官方文档
from pandas.tools.plotting import scatter_matrix
attributes=["median_house_value","median_income","total_rooms","housing_median_age"]
scatter_matrix(housing[attributes],figsize=(12,8)
最后
以上就是正直音响最近收集整理的关于pandas.DataFrame.corr &scatter_matrix计算各个属性之间相关系数的全部内容,更多相关pandas.DataFrame.corr内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复