dist_nvd {nevada}R Documentation

Pairwise Distance Matrix Between Two Samples of Networks

Description

This function computes the matrix of pairwise distances between all the elements of the two samples put together. The cardinality of the fist sample is denoted by n_1 and that of the second one is denoted by n_2.

Usage

dist_nvd(
  x,
  y = NULL,
  representation = "adjacency",
  distance = "frobenius",
  matching_iterations = 0,
  target_matrix = NULL
)

Arguments

x

A base::list of igraph::igraph objects or matrix representations of underlying networks from a given first population.

y

A base::list of igraph::igraph objects or matrix representations of underlying networks from a given second population.

representation

A string specifying the desired type of representation, among: "adjacency", "laplacian", "modularity" or "graphon". Default is "laplacian".

distance

A string specifying the chosen distance for calculating the test statistic, among: "hamming", "frobenius", "spectral" and "root-euclidean". Default is "frobenius".

matching_iterations

An integer value specifying the maximum number of runs when looking for the optimal permutation for graph matching. Defaults to 0L in which case no matching is done.

target_matrix

A square numeric matrix of size n equal to the order of the graphs specifying a target matrix towards which the initial doubly stochastic matrix is shrunk each time the graph matching algorithm fails to provide a good minimum. Defaults to NULL in which case the target matrix is automatically chosen between the identity matrix or the uniform matrix on the n-simplex.

Value

A matrix of dimension (n_1+n_2) \times (n_1+n_2) containing the distances between all the elements of the two samples put together.

Examples

gnp_params <- list(p = 1/3)
k_regular_params <- list(k = 8L)
x <- nvd(model = "gnp", n = 10L, model_params = gnp_params)
y <- nvd(model = "k_regular", n = 10L, model_params = k_regular_params)
dist_nvd(x, y, "adjacency", "spectral")

[Package nevada version 0.2.0 Index]