Compute UMAP embeddings from a numerical data frame

new_umapscan(
  d,
  n_neighbors = 15,
  min_dist = 0.01,
  metric = "euclidean",
  scale = FALSE,
  seed,
  data_sup = NULL,
  ...
)

Arguments

d

a data frame of numeric variables

n_neighbors

n_neighbors argument passed to uwot::umap()

min_dist

min_dist argument passed to uwot::umap()

metric

metric argument passed to uwot::umap()

scale

scaling to be applied to the variables. Value passed to uwot::umap().

seed

integer seed passed to base::set.seed() before umap embeddings for reproductibility

data_sup

a data.frame of supplementary variables not used for UMAP embeddings but for results visualisation

...

other arguments passed to uwot::umap()

Value

A list of class umapscan with the following components :

  • umap : results of UMAP embeddings

  • data : original numerical dataset

  • data_sup : supplementary dataset

  • clusters : a tree-like hierarchy of clusters

  • call : function call

  • seed : the seed used for random numbers for all umap and dbscan operations

See also

Examples

library(dplyr) iris_num <- iris %>% select_if(is.numeric) iris_sup <- iris %>% select(Species) new_umapscan(iris_num, data_sup = iris_sup)
#> #> Call: new_umapscan(d = iris_num, data_sup = iris_sup) #> #> UMAP embeddings of a 150x4 data frame #> with a 150x1 data frame of supplementary data #> #> Clusters : <none> #>