Leverages the den-SNE implementation in manifolds-rs - a very fast
Rust-based implementation. den-SNE is tSNE with an added density-preserving
term, so tight clusters stay tight and diffuse ones stay diffuse. This
version uses a pre-computed kNN graph, please see
new_nearest_neighbour().
Usage
rs_densne_from_knn(
embd,
knn_data,
n_dim,
perplexity,
approx_type,
densne_params,
seed,
verbose
)Arguments
- embd
Numerical matrix. The data to use to generate the embeddings. Should be of dimensions samples x features.
- knn_data
NearestNeighboursclass from R.- n_dim
Integer. Number of den-SNE dimensions to return. Needs to be two, others are not supported.
- perplexity
Numeric. The tSNE perplexity parameter.
- approx_type
String. One of
c("bh", "bh_qd", "fft", "fft_3k"). Which of the approximations to use.- densne_params
Named list. List that contains all of the key parameters for the den-SNE generation, i.e. the tSNE ones plus
lambda,fracandvar_shift.- seed
Integer. Seed for reproducibility.
- verbose
Integer. If
0L-> silent or1Lfor normal verbosity;2Lfor detailed verbosity.
