日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

详解sklearn中的make_moons函数

發布時間:2023/12/19 综合教程 31 生活家
生活随笔 收集整理的這篇文章主要介紹了 详解sklearn中的make_moons函数 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

make_moons是函數用來生成數據集,在sklearn.datasets里,具體用法如下:

Parameters:    

n_samples : int, optional (default=100)
    The total number of points generated.
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 or None (default)
    Determines random number generation for dataset shuffling and noise. Pass an int for reproducible output across multiple function calls. See Glossary.
Returns:    
X : array of shape [n_samples, 2]
    The generated samples.
y : array of shape [n_samples]
    The integer labels (0 or 1) for class membership of each sample.

主要參數作用如下:
n_numbers:生成樣本數量
shuffle:是否打亂,類似于將數據集random一下
noise:默認是false,數據集是否加入高斯噪聲
random_state:生成隨機種子,給定一個int型數據,能夠保證每次生成數據相同。
sklearn.datasets.make_moons(n_samples=100, shuffle=True, noise=None, random_state=None)
for example:
X, y = datasets.make_moons(500, noise=0.5)
參考文獻:
【1】https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_moons.html
————————————————
版權聲明:本文為CSDN博主「禪心001」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/woai8339/article/details/88628509

總結

以上是生活随笔為你收集整理的详解sklearn中的make_moons函数的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。