Learn R Programming

rtemis (version 1.4.3)

setup_UMAP: Setup UMAP config.

Description

Setup UMAP config.

Usage

setup_UMAP(
  k = 2L,
  n_neighbors = 15L,
  init = "spectral",
  metric = "euclidean",
  n_epochs = NULL,
  learning_rate = 1,
  scale = TRUE,
  features = NULL
)

Value

UMAPConfig object.

Arguments

k

Integer [1, Inf): Number of components.

n_neighbors

Integer [1, Inf): Number of neighbors.

init

Character: Initialization type. See uwot::umap "init".

metric

Character {"euclidean", "cosine", "manhattan", "hamming", "categorical"}: Distance metric.

n_epochs

Optional Integer [1, Inf): Number of epochs.

learning_rate

Numeric [0, Inf): Learning rate.

scale

Logical: If TRUE, scale input data before doing UMAP.

features

Optional Character vector: Names of at least 2 distinct feature columns to decompose. NULL decomposes all numeric features.

Author

EDG

Details

A high n_neighbors value may give error in some systems: "Error in irlba::irlba(L, nv = n, nu = 0, maxit = iters) : function 'as_cholmod_sparse' not provided by package 'Matrix'"

Examples

Run this code
umap_config <- setup_UMAP(k = 3L)
umap_config

Run the code above in your browser using DataLab