make_blobs
- sklearn.datasets.make_blobs(n_samples=100, n_features=2, *, centers=None, cluster_std=1.0, center_box=(-10.0, 10.0), shuffle=True, ,
Generate isotropic Gaussian blobs for clustering.
Read more in the User Guide.
If int, it is the total number of points equally divided among clusters. If array-like, each element of the sequence indicates the number of samples per cluster.
The number of features for each sample.
The number of centers to generate, or the fixed center locations. If n_samples is an int and centers is None, 3 centers are generated. If n_samples is array-like, centers must be either None or an array of length equal to the length of n_samples.
The standard deviation of the clusters.
The bounding box for each cluster center when centers are generated at random.
Shuffle the samples.
Determines random number generation for dataset creation. Pass an int for reproducible output across multiple function calls. See Glossary.
If True, then return the centers of each cluster.
The generated samples.
The integer labels for cluster membership of each sample.
The centers of each cluster. Only returned if
return_centers=True.
>>> from sklearn.datasets import make_blobs
>>> X, y = make_blobs(n_samples=10, centers=3, n_features=2,
... random_state=0)
>>> print(X.shape
Probability Calibration for 3-class classification
Normal, Ledoit-Wolf and OAS Linear Discriminant Analysis for classification
Bisecting K-Means and Regular K-Means Performance Comparison
Comparing different clustering algorithms on toy datasets
Selecting the number of clusters with silhouette analysis on KMeans clustering
Comparing different hierarchical linkage methods on toy datasets
Comparison of the K-Means and MiniBatchKMeans clustering algorithms
Decision Boundaries of Multinomial and One-vs-Rest Logistic Regression
Comparing anomaly detection algorithms for outlier detection on toy datasets
Demonstrating the different strategies of KBinsDiscretizer