
hand-on machine learning
华间一壶酒
这个作者很懒,什么都没留下…
展开
-
matplotlib绘图,基本绘图,设置子图间距,设置折线类型,标签,设置坐标轴范围、标签,设置子图标题
基本绘图,设置子图间距,设置折线类型,标签,设置坐标轴范围、标签,设置子图标题 import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import LinearRegression x1,y1=[-1,0,1],[0,0,1] x2,y2=np.arange(5),np.random.rand(5,1) x3,n_bins=np.random.randn(200,1),50 x4,y4=np.random原创 2020-11-06 15:41:51 · 1382 阅读 · 0 评论 -
numpy中常见的random
numpy.random.rand(d0, d1, ..., dn) 返回给定形状的数组,其元素来自[0,1)均匀分布。 numpy.random.randint(low, high=None, size=None, dtype=int) 返回来自[low,high)均匀分布的整数。如果没有给出,则[0,low) numpy.random.randn(d0, d1, ..., dn)返回给定形状的数组,其元素来自标准分布。 numpy.random.random(size=None)返回 [0.0.原创 2020-11-05 21:14:32 · 159 阅读 · 0 评论 -
chapter 3 Classfication
Chapter 3 Classfication 主要讲分类问题的性能度量选择。 SGDClassfier 适合处理大数据集和在线学习This classifier has the advantage of being capable of handling very large datasets efficiently. This is in part because SGD deals with training instances independently, one at a time (which原创 2020-10-29 16:50:24 · 250 阅读 · 0 评论 -
Chapter 2 End to End Machine Learning Project学习笔记
Chapter 2 End to End Machine Learning Project 对于类别特征使用OrdinalEncoder,ML算法会认为离得近的数字特征比离得远的数字特征相似。所以推荐OneHotEncoder。 If a categorical attribute has a large number of possible categories (e.g., country code, profession, species, etc.), then one-hot encod‐原创 2020-10-23 20:33:34 · 268 阅读 · 0 评论