Make a large circle containing a smaller circle in 2d.
A simple toy dataset to visualize clustering and classification algorithms.
Read more in the User Guide.
If int, it is the total number of points generated. For odd numbers, the inner circle will have one point more than the outer circle. If two-element tuple, number of points in outer circle and inner circle.
Changed in version 0.23: Added two-element tuple.
Whether to shuffle the samples.
Standard deviation of Gaussian noise added to the data.
Determines random number generation for dataset shuffling and noise. Pass an int for reproducible output across multiple function calls. See Glossary.
Scale factor between inner and outer circle in the range [0, 1).
The generated samples.
The integer labels (0 or 1) for class membership of each sample.
>>> from sklearn.datasets import make_circles >>> X, y = make_circles(random_state=42) >>> X.shape (100, 2) >>> y.shape (100,) >>> list(y[:5]) [np.int64(1), np.int64(1), np.int64(1), np.int64(0), np.int64(0)]
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.datasets.make_circles.html