knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(disgraph)
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.
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.