*#1. 参数

A simple toy dataset to visualize clustering and classification algorithms. Read more in the User Guide.Parameters
n_samples:  int or two-element tuple, optional (default=100)
If int, the total number of points generated. If two-element tuple, number of points in each of two moons.shuffle: bool, optional (default=True)
Whether to shuffle the samples.noise: double or None (default=None)
Standard deviation of Gaussian noise added to the data.random_state:  int, RandomState instance, default=None
Determines random number generation for dataset shuffling and noise. Pass an int for reproducible output across multiple function calls. See Glossary.Returns
Xarray of shape [n_samples, 2]
The generated samples.yarray of shape [n_samples]
The integer labels (0 or 1) for class membership of each sample.
  1. 参数说明
    n_samples : 样本数,默认100个
    shuffle:是否随机打乱, 默认true
    noise: double 是否添加噪音
    random_state: 随机种子,给个int, 每次产生相同随机数。
返回:   X : [样本数, 2]y:[样本数], 0,1example:
import numpy as np
from sklearn.datasets import make_moons
import matplotlib.pyplot as plt
# 手动生成一个随机的平面点分布,并画出来
np.random.seed(0)
X, y = make_moons(200, noise=0.50)
plt.scatter(X[:,0], X[:,1], s=10, c=y, cmap=plt.cm.Spectral)
plt.show()

sklearn --make_moons相关推荐

  1. sklearn中的make_moons函数

    sklearn.datasets.make_moons()生成数据集 主要参数作用如下: n_samples:生成样本数量 shuffle:是否打乱,类似于将数据集random一下 noise:默认是 ...

  2. 详解sklearn中的make_moons函数

    make_moons是函数用来生成数据集,在sklearn.datasets里,具体用法如下: Parameters: n_samples : int, optional (default=100)T ...

  3. sklearn.datasets中的几个函数make_moons(), make_circles(), make_classification()

    1.make_moons() sklearn.datasets.make_moons(n_samples=100, shuffle=True, noise=None, random_state=Non ...

  4. sklearn的make_circles和make_moons生成数据

    sklearn的make_circles和make_moons生成数据 关于make_circles and make_moons生成环形形状和月亮形状数据 转载来源:https://blog.csd ...

  5. Kmeans聚类②——Sklearn数据生成器(make_blobs,make_classification,make_circles,make_moons)

    Kmeans系列目录: Kmeans聚类②--Sklearn数据生成器(make_blob/classification/circles/make_moons) Kmeans聚类③--Kmeans聚类 ...

  6. sklearn.datasets.make_circles()函数和make_moons()函数

    sklearn.datasets.make_circles(n_samples = 100,shuffle = True,noise = None,random_state = None,factor ...

  7. sklearn学习之:(7)sklearn 自动生成数据集用法:make_hastie_10_2, make_circles, make_moons

    文章目录 一.sklearn.datasets.make_hastie_10_2 1. 产生数据: 2. 验证数据的正态性 3. 数据可视化 4. 代码 二.sklearn.datasets.make ...

  8. KNN分类sklearn的make_moons数据集

    直接上代码 from sklearn.datasets import make_moons from numpy import * import numpy as np import operator ...

  9. sklearn 高维数据集制作make_circles 和 make_moons

    sklearn 高维数据集制作make_circles 和 make_moons import pandas as pd import matplotlib.pyplot as plt from sk ...

最新文章

  1. ObjectIOStream 对象流 ByteArrayIOStream 数组流 内存流 ZipOutputStream 压缩流
  2. 记一些css 3效果
  3. Java基类Object中有哪些方法
  4. 【杂谈】当前模型剪枝有哪些可用的开源工具?
  5. Eclipse和MyEclipse相关的快捷键
  6. linux组手机nas,linux 搭建nas服务器
  7. 国内首批AI专业毕业生创办的澎思科技,已完成Pre-A轮融资
  8. NSString 和 NSMutableString
  9. springboot学习笔记-5 springboot整合shiro
  10. 数库“SmarTag”数据体系正式登陆Factset另类数据市场
  11. vs2003在win7+后pdb锁住报LNK1201解决方案
  12. 下载iPhone APP软件历史版本教程
  13. GoldenDict音标乱码
  14. 写给青春,写给军乐团
  15. 软件开发合同纠纷的律师随笔
  16. PHPexcel文档 laravelExecl可参考
  17. 不懂编程?节点包来凑——Dynamo常用节点包推荐(下)
  18. 3.2-上位机与下位机的“私有协议”通信构架设计
  19. 简约纯色卡通蝴蝶Mac动态壁纸
  20. ip-cmd-遍历局域网内联通的所有IP地址

热门文章

  1. python 使用XLWT编辑Excel文档
  2. 将jar包直接Buldpath所引起的问题
  3. Boson NetSim for CCNP 7.06全套搞定
  4. Twitter或面临欧盟更严格内容审核;韩国电商巨头用机器人军团替代仓库工人;高通公司副总裁加盟三星丨每日大事件...
  5. 如何选择阿里云ECS服务器?
  6. 树莓派连接不上华为随身wifi
  7. 当“疯子”遇上“儒生”:李彦宏儒雅应对,一如既往
  8. MyBioSource 重组人白细胞介素-24解决方案
  9. [AHK]调用TradeX.dll获取五档行情
  10. 活动图、泳道图、时序图、状态图、协作图的区别