MST: Minimum Spanning Tree (MST)

View source: R/helper_functions_gTests.R

MSTR 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 dist object.

K

Component number (default: K = 1).

Details

For more details see mstree.

Value

Object of class neig.

See Also

CCS, CF, FR, ZC

Examples

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) 
}

DataSimilarity documentation built on April 3, 2025, 9:39 p.m.