View source: R/graph_summary_divergence.R
| graph.summary.divergence | R Documentation |
Extracts one selected graph summary from two graph-like objects and computes a divergence between the resulting probability mass functions.
Currently the supported divergence is Jensen-Shannon divergence, implemented
via jensen.shannon.divergence().
graph.summary.divergence(
g1,
g2,
summary = c("degree_distribution", "edge_weight_distribution",
"component_size_distribution", "neighborhood_label_distribution"),
divergence = c("js"),
labels = NULL,
summary.args = list(),
support = NULL,
return.details = TRUE
)
g1 |
First graph-like object. |
g2 |
Second graph-like object. |
summary |
Summary type to compare. |
divergence |
Divergence type. Currently only |
labels |
Optional shared vertex-label vector used for
|
summary.args |
Optional named list forwarded to
|
support |
Optional common support. If |
return.details |
Logical; if |
If return.details = TRUE, a list with fields:
summary: summary type used.
divergence: divergence type used.
value: scalar divergence value.
pmf1: aligned PMF for g1.
pmf2: aligned PMF for g2.
support: aligned support.
metadata: summary-specific metadata for both graphs.
Otherwise, returns the scalar divergence value.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.