- 2 End-to-End Machine Learning Project
用这篇文章记录下读书心得
2021年11月10日我的软件版本为:
| 库 | 版本 |
|---|---|
| Python | 3.9 |
| PyCharm | 2021.2.3(Community Edition) |
| numpy | 1.21.4 |
| pandas | 1.3.4 |
| scikit-learn | 1.0.1 |
| matplotlib | 3.4.3 |
第57页有如下代码
from pd.tools.plotting import scatter_matrix
attributes = ["median_house_value", "median_income", "total_rooms",
"housing_median_age"]
scatter_matrix(housing[attributes], figsize=(12, 8))
实际是无法执行的,估计和软件版本有关系,查询matplotlib官网后将代码改为:
pd.plotting.scatter_matrix(housing[attributes], figsize=(12, 8)) plt.show()
即可顺利执行。



