powered by
Constructs the k-MST used by default in the data-level gSeg interface.
gseg_kmst(x = NULL, dissimilarity = NULL, k = NULL)
A two-column edge matrix containing the union of the first k MST layers.
k
Optional data matrix with observations in rows.
Optional square dissimilarity matrix or a dist object. Supply exactly one of x and dissimilarity.
dist
x
dissimilarity
Number of complete MST layers. The default is floor(sqrt(N)); the largest allowed value is floor(N/2).
floor(sqrt(N))
floor(N/2)
set.seed(1) x <- matrix(rnorm(60), nrow = 20) E <- gseg_kmst(x = x) attr(E, "k")
Run the code above in your browser using DataLab