edge_count_global_variables: Transform distance matrix in edge properties of minimal...

View source: R/statistics.R

edge_count_global_variablesR Documentation

Transform distance matrix in edge properties of minimal spanning tree

Description

Transform distance matrix in edge properties of minimal spanning tree

Usage

edge_count_global_variables(d, n1, k = 1L)

Arguments

d

A matrix of dimension (n1+n2)x(n1+n2) containing the distances between all the elements of the two samples put together.

n1

An integer giving the size of the first sample.

k

An integer specifying the density of the minimal spanning tree to generate.

Value

A list of edge properties of the minimal spanning tree.

Examples

n1 <- 30L
n2 <- 10L
gnp_params <- list(n = 24L, p = 1/3)
degree_params <- list(out_degree = rep(2, 24L), method = "configuration")
x <- nvd(sample_size = n1, model = "gnp", !!!gnp_params)
y <- nvd(sample_size = n2, model = "degree", !!!degree_params)
d <- dist_nvd(x, y, representation = "laplacian", distance = "frobenius")
e <- edge_count_global_variables(d, n1, k = 5L)

astamm/nevada documentation built on Dec. 17, 2024, 1:23 a.m.