| pacmap | R Documentation |
Performs PaCMAP dimensionality reduction on the input data. This function provides a user-friendly interface with input validation before calling the Rust implementation.
pacmap(
data,
knn = NULL,
n_dim = 2L,
knn_method = c("kmknn", "balltree", "hnsw", "annoy", "nndescent", "exhaustive", "ivf"),
nn_params = params_nn(),
pacmap_params = params_pacmap(),
seed = 42L,
use_high_precision = NULL,
.verbose = TRUE
)
data |
Numerical matrix or data frame. The data to embed of shape samples x features. Will be coerced to a matrix. |
knn |
Optional |
n_dim |
Integer. Number of dimensions in the embedding space.
Defaults to |
knn_method |
Character. (Approximate) Nearest neighbour method to use.
One of |
nn_params |
Named list. Nearest neighbour search parameters, see
|
pacmap_params |
Named list. PaCMAP algorithm parameters, see
|
seed |
Integer. Random seed for reproducibility. Defaults to |
use_high_precision |
Optional boolean. Gives fine-grained control over
|
.verbose |
Logical. Controls verbosity. Defaults to |
A numerical matrix with dimensions samples x n_dim containing the PaCMAP embedding.
d <- manifold_synthetic_data(type = "clusters", n_samples = 500L)
emb <- pacmap(d$data, .verbose = FALSE)
dim(emb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.