make_swiss_roll
- sklearn.datasets.make_swiss_roll(n_samples=100, *, noise=0.0, random_state=None, hole=False)
Generate a swiss roll dataset.
Read more in the User Guide.
Adapted with permission from Stephen Marsland’s code [1].
Generate a swiss roll dataset.
Read more in the User Guide.
Adapted with permission from Stephen Marsland’s code [1].
The number of sample points on the Swiss Roll.
The standard deviation of the gaussian noise.
Determines random number generation for dataset creation. Pass an int for reproducible output across multiple function calls. See Glossary.
If True generates the swiss roll with hole dataset.
The points.
The univariate position of the sample according to the main dimension of the points in the manifold.
The algorithm is from Marsland [1].
S. Marsland, “Machine Learning: An Algorithmic Perspective”, 2nd edition, Chapter 6, 2014. https://homepages.ecs.vuw.ac.nz/~marslast/Code/Ch6/lle.py
>>> from sklearn.datasets import make_swiss_roll
>>> X, t = make_swiss_roll(noise=0.05, random_state=0)
>>> X.shape
(100, 3)
>>> t.shape
(100,)
Hierarchical clustering with and without structure