MST {DataSimilarity} | R Documentation |
Minimum Spanning Tree (MST)
Description
Calculte the edge matrix of a minimum spanning tree based on a distance matrix, used as helper functions in CCS
, CF
, FR
, and ZC
.
This function is a wrapper around mstree
.
Usage
MST(dists, K = 1)
Arguments
dists |
Distance matrix as |
K |
Component number (default: |
Details
For more details see mstree
.
Value
Object of class neig
.
See Also
Examples
set.seed(1234)
X1 <- matrix(rnorm(1000), ncol = 10)
X2 <- matrix(rnorm(1000, mean = 0.5), ncol = 10)
dists <- stats::dist(rbind(X1, X2))
if(requireNamespace("ade4", quietly = TRUE)) {
# MST
MST(dists)
# 5-MST
MST(dists, K = 5)
}
[Package DataSimilarity version 0.2.0 Index]