sklearn.datasets.make_swiss_roll

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

Generate a swiss roll dataset.

Read more in the User Guide.

Parameters
n_samplesint, default=100

The number of sample points on the S curve.

noisefloat, default=0.0

The standard deviation of the gaussian noise.

random_stateint, RandomState instance or None, default=None

Determines random number generation for dataset creation. Pass an int for reproducible output across multiple function calls. See Glossary.

Returns
Xndarray of shape (n_samples, 3)

The points.

tndarray of shape (n_samples,)

The univariate position of the sample according to the main dimension of the points in the manifold.

Notes

The algorithm is from Marsland [1].

References

1

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

Examples using sklearn.datasets.make_swiss_roll

© 2007–2020 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/0.24/modules/generated/sklearn.datasets.make_swiss_roll.html