# make_blobs

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

Makes labeled Dask-Cupy arrays containing blobs
for a randomly generated set of centroids.

This function calls [`make_blobs`](#cuml.dask.datasets.make_blobs) from [`cuml.datasets`](../../cuml.datasets/index.html.md#module-cuml.datasets) on each Dask worker
and aggregates them into a single Dask Dataframe.

For more information on Scikit-learn’s [make_blobs](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_blobs.html).

* **Parameters:**
  **n_samples**
  : number of rows

  **n_features**
  : number of features

  **centers**
  : optional (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**
  : standard deviation of points around centroid

  **n_parts**
  : number of partitions to generate (this can be greater
    than the number of workers)

  **center_box**
  : the bounding box which constrains all the centroids

  **random_state**
  : sets random seed (or use None to reinitialize each time)

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

  **verbose**
  : Logging level.

  **shuffle**
  : Shuffles the samples on each worker.

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

  **dtype**
  : Dtype of the generated samples

  **client**
  : Dask client to use

  **workers**
  : Dask addresses of workers to use for computation.
    If None, all available Dask workers will be used.
    (e.g. : `workers = list(client.scheduler_info()['workers'].keys())`)
* **Returns:**
  **X**
  : The input samples.

  **y**
  : The output values.

  **centers**
  : [n_centers, n_features], optional
    The centers of the underlying blobs. It is returned only if
    return_centers is True.

### Examples

```python
>>> from dask_cuda import LocalCUDACluster
>>> from dask.distributed import Client
>>> from cuml.dask.datasets import make_blobs

>>> cluster = LocalCUDACluster(threads_per_worker=1)
>>> client = Client(cluster)

>>> workers = list(client.scheduler_info()['workers'].keys())
>>> X, y = make_blobs(1000, 10, centers=42, cluster_std=0.1,
...                   workers=workers)

>>> client.close()
>>> cluster.close()
```

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