# johnson_lindenstrauss_min_dim

### cuml.random_projection.johnson_lindenstrauss_min_dim(n_samples, eps=0.1)[[source]](https://github.com/NVIDIA/cuml/blob/93418baf5/python/cuml/cuml/random_projection/random_projection.py#L19)

Find a ‘safe’ number of components to randomly project to.

The Johnson–Lindenstrauss lemma states that high-dimensional data can be
embedded into lower dimension while preserving the distances.

This function finds the minimum number of components to guarantee that
the embedding is inside the eps error tolerance.

* **Parameters:**
  **n_samples**
  : Number of samples.

  **eps**
  : Maximum distortion rate as defined by the Johnson-Lindenstrauss lemma.
* **Returns:**
  **n_components**
  : The minimal number of components to guarantee with good probability
    an eps-embedding with n_samples.

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