Skip to contents

[Experimental] This is the wrapper function into the Rust interface for GPU-accelerated UMAP. Leverages GPU acceleration in the kNN search and also in the optimisation.

Usage

rs_umap_gpu(
  embd,
  n_dim,
  min_dist,
  spread,
  k,
  umap_params,
  seed,
  backend = "wgpu",
  verbose
)

Arguments

embd

Numerical matrix. The data to use to generate the embeddings. Should be of dimensions samples x features.

n_dim

Integer. Number of UMAP dimensions to return.

min_dist

Numeric. Minimum distance to use.

spread

Numeric. Spread parameter to use.

k

Integer. Number of nearest neighbours to consider

umap_params

Named list. List that contains all of the key parameters for the UMAP generation.

seed

Integer. Seed for reproducibility.

backend

String. "wgpu" or "mlx". "mlx" runs the kNN search and the "adam_gpu" optimiser on MLX (Apple Silicon, needs a build with the MLX backend, see mlx_available()); CPU optimisers stay on the CPU.

verbose

Integer. If 0L -> silent or 1L for normal verbosity; 2L for detailed verbosity.

Value

The UMAP embeddings.