lmdt_graph.Rd
Constructs an undirected, self-tuning k-nearest neighbors affinity graph and its normalized Laplacian matrix from a covariate matrix.
lmdt_graph(X, k = NULL)
A numeric matrix or data frame of covariates (n x p).
Number of nearest neighbors. Default is adaptive rule of thumb.
A list containing matrices W, S, L, local scales sigma, and vertex degrees.
set.seed(42) X <- matrix(rnorm(50 * 2), ncol = 2) g <- lmdt_graph(X, k = 5) dim(g$S) #> [1] 50 50