# make_blobs

### cuml.datasets.make_blobs(n_samples=100, n_features=2, centers=None, cluster_std=1.0, center_box=(-10.0, 10.0), shuffle=True, random_state=None, return_centers=False, order='F', dtype='float32')[[source]](https://github.com/NVIDIA/cuml/blob/93418baf5/python/cuml/cuml/datasets/blobs.py#L73)

Generate isotropic Gaussian blobs for clustering.

* **Parameters:**
  **n_samples**
  : 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.

  **n_features**
  : The number of features for each sample.

  **centers**
  : (default=None)
    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`.

  **cluster_std**
  : The standard deviation of the clusters.

  **center_box**
  : The bounding box for each cluster center when centers are
    generated at random.

  **shuffle**
  : Shuffle the samples.

  **random_state**
  : Determines random number generation for dataset creation. Pass an int
    for reproducible output across multiple function calls.

  **return_centers**
  : If True, then return the centers of each cluster

  **order: str, optional (default=’F’)**
  : The order of the generated samples

  **dtype**
  : Dtype of the generated samples
* **Returns:**
  **X**
  : The generated samples.

  **y**
  : The integer labels for cluster membership of each sample.

  **centers**
  : The centers of each cluster. Only returned if
    `return_centers=True`.

#### SEE ALSO
[`make_classification`](../cuml.datasets.make_classification/index.html.md#cuml.datasets.make_classification)
: a more intricate variant

### Examples

```python
>>> from sklearn.datasets import make_blobs
>>> X, y = make_blobs(n_samples=10, centers=3, n_features=2,
...                   random_state=0)
>>> print(X.shape)
(10, 2)
>>> y
array([0, 0, 1, 0, 2, 2, 2, 1, 1, 0])
>>> X, y = make_blobs(n_samples=[3, 3, 4], centers=None, n_features=2,
...                   random_state=0)
>>> print(X.shape)
(10, 2)
>>> y
array([0, 1, 2, 0, 2, 2, 2, 1, 1, 0])
```

<!-- !! processed by numpydoc !! -->
