Leverages the DREAMS implementation in manifolds-rs. DREAMS is tSNE with an
added pull towards a global reference embedding (PCA unless one is
supplied). This version uses a pre-computed kNN graph, please see
new_nearest_neighbour().
Usage
rs_dreams_from_knn(
embd,
knn_data,
reference,
n_dim,
perplexity,
approx_type,
dreams_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.- reference
Optional numerical matrix. Global reference embedding of dimensions samples x 2. If
NULL, the first two principal components are used.- n_dim
Integer. Number of DREAMS 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.- dreams_params
Named list. List that contains all of the key parameters for the DREAMS generation, i.e. the tSNE ones plus
lambda.- seed
Integer. Seed for reproducibility.
- verbose
Integer. If
0L-> silent or1Lfor normal verbosity;2Lfor detailed verbosity.
