码迷,mamicode.com
首页 > 编程语言 > 详细

python机器学习-chapter2_3

时间:2020-02-02 19:38:33      阅读:69      评论:0      收藏:0      [点我收藏+]

标签:设置   https   机器   class   python   csdn   plt   tail   apt   

•line = np.linspace(-3, 3, 1000).reshape(-1, 1)

np.linspace(-3, 3, 100)用来返回-3到3之间的100个等间距的数字,返回值是一个列表

np.linspace(): https://blog.csdn.net/u013555719/article/details/83989987

np.reshape(-1, 1)用来将数组转换为一列

np.reshape(): https://blog.csdn.net/qq_29831163/article/details/90112000#reshape(-1%2C1)%E8%BD%AC%E6%8D%A2%E6%88%901%E5%88%97%EF%BC%9A

 

•plot符号大全

https://blog.csdn.net/ztf312/article/details/49933497

 

•plt.legend(["Class 0", "Class 1"], loc = "best")

plt.legend()中loc可以直接设置为"best"

 

python机器学习-chapter2_3

标签:设置   https   机器   class   python   csdn   plt   tail   apt   

原文地址:https://www.cnblogs.com/bozi/p/12253131.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!