knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(disgraph)

Graph distance methods to compare two networks.

The basic usage of a distance algorithm is as follows:

library(disgraph)

graph <- matrix(
  cbind(
    c(0.0, 1.0, 0.0, 0.0),
    c(0.0, 0.0, 1.0, 0.0),
    c(0.0, 0.0, 0.0, 1.0),
    c(0.0, 0.0, 0.0, 0.0)
  ),
  nrow = 4
)

dist <- dist_frobenius(graph, graph)

Here, graph is a matrix but the api also works with igraph objects. The results are either a structure or numeric representing the distance value or computed side effects.

Available distances

All of the following algorithms follow the same previous usage as above.

| function | algorithm | |------ |--- | | dist_frobenius | Frobenius Norm Distance| | dist_hamming_ipsen_mikhailov | Hamming Ipsen Mikhailov Distance | | dist_ipsen_mikhailov | Ipsen Mikhailov Distance | | dist_laplacian_spectral | Laplacian Spectral Distance | | dist_polynomial_dissimilarity | Polynomial Dissimilarity Distance |



travisbyrum/disgraph documentation built on May 6, 2021, 9:08 p.m.