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.

n_samples : int, optional (default=100)

The number of sample points on the S curve.

noise : float, optional (default=0.0)

The standard deviation of the gaussian noise.

random_state : int, RandomState instance or None (default)

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

X : array of shape [n_samples, 3]

The points.

t : array of shape [n_samples]

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


The algorithm is from Marsland [1].


[1]S. Marsland, “Machine Learning: An Algorithmic Perspective”, Chapter 10, 2009.