sklearn.datasets.make_moons()生成数据集
主要参数作用如下:n_
samples:生成样本数量shuffle
:是否打乱,类似于将数据集random
一下noise
:默认是false
,数据集是否加入高斯噪声random_state
:生成随机种子,给定一个int
型数据,能够保证每次生成数据相同。
X, Y = datasets.make_moons(200, noise=0.2)
X : array of shape [n_samples, 2]
The generated samples.
y : array of shape [n_samples]
The integer labels (0 or 1)