《Hands-On Machine Learning with Scikit-Learn & TensorFlow》阅读笔记

《Hands-On Machine Learning with Scikit-Learn & TensorFlow》阅读笔记,第1张

《Hands-On Machine Learning with Scikit-Learn & TensorFlow》阅读笔记

目录
  • 2 End-to-End Machine Learning Project

用这篇文章记录下读书心得
2021年11月10日我的软件版本为:

库版本Python3.9PyCharm2021.2.3(Community Edition)numpy1.21.4pandas1.3.4scikit-learn1.0.1matplotlib3.4.3 2 End-to-End Machine Learning Project

第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()

即可顺利执行。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5443507.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-11
下一篇2022-12-11

发表评论

登录后才能评论

评论列表(0条)

    保存