sklearn.datasets.make_swiss_roll?

sklearn.datasets.make_swiss_roll(n_samples=100, *, noise=0.0, random_state=None)

[源碼]

生成swiss roll數據集。

在用戶指南中閱讀更多內容。

參數 說明
n_samples int, optional (default=100)
S曲線上的采樣點數。
noise float, optional (default=0.0)
高斯噪聲的標準偏差。
random_state int, RandomState instance, default=None
確定用于生成數據集的隨機數生成。 為多個函數調用傳遞可重復輸出的int值。 請參閱詞匯表
返回值 說明
X array of shape [n_samples, 3]
點。
t array of shape [n_samples]
樣本的單變量位置,取決于集合上各點的主要維度。

該算法來自Marsland [1]。

參考

  • 1

    S. Marsland, “Machine Learning: An Algorithmic Perspective”, Chapter 10, 2009. http://seat.massey.ac.nz/personal/s.r.marsland/Code/10/lle.py