Skip to contents

Compute the upper bound distance defined in Zhang et al. (2017) .

Usage

dist_max(A)

Arguments

A

An \(n \times n\) adjacency matrix

Value

An \(n \times n\) matrix \(D\), where \(D_{i,j}\) represents the computed distance between nodes \(v_i\) and \(v_j\).

Details

Computes distance matrix \(D\) where each \(d_{i,j} = \max_{k\neq i,j}| \langle A_{i, \cdot} - A_{j, \cdot} , A_{k, \cdot} \rangle | /n\)

\(d_{i,j}\) is computed by dist_max_ij internal function.

References

Zhang Y, Levina E, Zhu J (2017). “Estimating network edge probabilities by neighbourhood smoothing.” Biometrika, 104(4), 771--783.

Examples

library(JaB)
library(igraph)
data("paul.revere")

A <- as_adjacency_matrix(paul.revere, sparse = FALSE)
D <- dist_max(A)