Toggle Menu
Prev Up Next

scikit-learn 1.3.2
Other versions

Please cite us if you use the software.

# `sklearn.datasets`.make_s_curve

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

  Generate an S curve dataset.

  Read more in the User Guide.

  Parameters:
    n_samples int, default=100

      The number of sample points on the S curve.

    noise float, default=0.0

      The standard deviation of the gaussian noise.

    random_state int, 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:
    X ndarray of shape (n_samples, 3)

      The points.

    t ndarray of shape (n_samples,)

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

## Examples using `sklearn.datasets.make_s_curve`

Comparison of Manifold Learning methods

Comparison of Manifold Learning methods

t-SNE: The effect of various perplexity values on the shape

t-SNE: The effect of various perplexity values on the shape