Run diffusion map
run_diffusion.RdPerforms non-linear dimensionality reduction using the exact dense method. Best suited for smaller datasets where calculating the full N x N distance matrix fits safely into memory.
Arguments
- data
Numeric matrix or data.frame. Missing values (NA) and infinite values are not supported and will cause an error.
- sigma
Numeric. Bandwidth for Gaussian kernel (default 1.0).
- dims
Integer. Number of diffusion dimensions to return (default 2).
- oversampling
Integer. Dimensions added for stability in randomized SVD algorithm (default 10). Higher values may negatively impact results of thr algorithm.
- n_iter
Integer. Number of subspace iterations in randomized SVD algorithm (default 10).
Examples
data <- matrix(runif(1000), nrow = 50, ncol = 20)
optimal_sigma <- estimate_sigma(data)
model <- run_diffusion(data, sigma = optimal_sigma)