Skip to contents

[Experimental] Leverages the PHATE implementation in manifolds-rs - a very fast Rust-based implementation. This version uses a pre-computed kNN graph, please see new_nearest_neighbour().

Usage

rs_phate_from_knn(embd, knn_data, n_dim, k, phate_params, seed, verbose)

Arguments

embd

Numerical matrix. The data to embed of shape samples x features.

knn_data

NearestNeighbours class from R.

n_dim

Integer. Number of PHATE dimensions to return. Currently only 2L is supported.

k

Integer. Number of nearest neighbours that set the kernel bandwidth. Every neighbour in knn_data can join the kernel while its affinity clears thresh, so build it 6 * k + 5 wide to match the internal search.

phate_params

Named list. Contains all key parameters for PHATE, see params_phate() and params_nn().

seed

Integer. Seed for reproducibility.

verbose

Integer. If 0L -> silent or 1L for normal verbosity; 2L for detailed verbosity.

Value

The PHATE embedding as a matrix of shape samples x n_dim.