
Wrapper function to generate PHATE parameters (GPU version)
params_phate_gpu.RdWrapper function to generate PHATE parameters (GPU version)
Usage
params_phate_gpu(
decay = 40,
bandwidth_scale = 1,
thresh = 1e-04,
graph_symmetry = c("additive", "multiplicative", "mnn", "none"),
n_landmarks = 2048L,
landmark_method = c("spectral", "random", "density"),
landmark_k_means = c("emeans", "lloyd"),
n_svd = NULL,
t_max = 100L,
t_custom = NULL,
gamma = 1,
mds_method = c("sgd_dense", "classic"),
mds_iter = NULL,
randomised = TRUE
)Arguments
- decay
Numeric or
NULL. Alpha decay exponent of the kernel. Higher values give sharper transitions.NULLgives a binary connectivity kernel. Defaults to40.0.- bandwidth_scale
Numeric. Multiplicative factor on the kernel bandwidth. Defaults to
1.0.- thresh
Numeric. Affinities below this are set to zero. Neighbours past
kjoin the kernel while their affinity clears it. Defaults to1e-04.- graph_symmetry
String. How to symmetrise the affinity graph. One of
c("additive", "multiplicative", "mnn", "none"). Defaults to"additive".- n_landmarks
Integer or
NULL. Number of landmarks for the compressed diffusion operator.NULL, or a value of at least the number of samples, runs the full N x N operator, which gets painful fast. Defaults to2048L.- landmark_method
String. How to select the landmarks.
"spectral"runs its randomised SVD and k-means on the GPU (or on MLX withbackend = "mlx"). One ofc("spectral", "random", "density"). Defaults to"spectral".- landmark_k_means
String. k-means used by the spectral landmark selection. Ignored by the other landmark methods. One of
c("emeans", "lloyd"). Defaults to"emeans".- n_svd
Integer or
NULL. Singular vectors for spectral landmark selection. IfNULL, defaults to100on the Rust side. Defaults toNULL.- t_max
Integer. Largest diffusion time the Von Neumann entropy knee search considers. Defaults to
100L.- t_custom
Integer or
NULL. Fixed diffusion time. IfNULL, picks the knee automatically. Defaults toNULL.- gamma
Numeric. Informational distance constant.
1is the log potential. Defaults to1.0.- mds_method
String. MDS algorithm for the final embedding. One of
c("sgd_dense", "classic"). Defaults to"sgd_dense".- mds_iter
Integer or
NULL. Number of SGD-MDS iterations. IfNULL, the Rust side runs 300 below 1000 points, 500 below 5000 and 800 otherwise (points being the landmarks when landmarks are used). Defaults toNULL.- randomised
Boolean. Use randomised SVD for classic MDS (
mds_method = "classic"). SGD-MDS initialises from a randomised classic MDS either way. Defaults toTRUE.
Value
A named list with the following elements:
decay - Numeric or
NULL. Alpha decay exponent of the kernel. Higher values give sharper transitions.NULLgives a binary connectivity kernel. Defaults to40.0.bandwidth_scale - Numeric. Multiplicative factor on the kernel bandwidth. Defaults to
1.0.thresh - Numeric. Affinities below this are set to zero. Neighbours past
kjoin the kernel while their affinity clears it. Defaults to1e-04.graph_symmetry - String. How to symmetrise the affinity graph. One of
c("additive", "multiplicative", "mnn", "none"). Defaults to"additive".n_landmarks - Integer or
NULL. Number of landmarks for the compressed diffusion operator.NULL, or a value of at least the number of samples, runs the full N x N operator, which gets painful fast. Defaults to2048L.landmark_method - String. How to select the landmarks.
"spectral"runs its randomised SVD and k-means on the GPU (or on MLX withbackend = "mlx"). One ofc("spectral", "random", "density"). Defaults to"spectral".landmark_k_means - String. k-means used by the spectral landmark selection. Ignored by the other landmark methods. One of
c("emeans", "lloyd"). Defaults to"emeans".n_svd - Integer or
NULL. Singular vectors for spectral landmark selection. IfNULL, defaults to100on the Rust side. Defaults toNULL.t_max - Integer. Largest diffusion time the Von Neumann entropy knee search considers. Defaults to
100L.t_custom - Integer or
NULL. Fixed diffusion time. IfNULL, picks the knee automatically. Defaults toNULL.gamma - Numeric. Informational distance constant.
1is the log potential. Defaults to1.0.mds_method - String. MDS algorithm for the final embedding. One of
c("sgd_dense", "classic"). Defaults to"sgd_dense".mds_iter - Integer or
NULL. Number of SGD-MDS iterations. IfNULL, the Rust side runs 300 below 1000 points, 500 below 5000 and 800 otherwise (points being the landmarks when landmarks are used). Defaults toNULL.randomised - Boolean. Use randomised SVD for classic MDS (
mds_method = "classic"). SGD-MDS initialises from a randomised classic MDS either way. Defaults toTRUE.