View source: R/graph_summary_divergence.R
| compute.graph.summary.pmf | R Documentation |
Converts a graph-like object into a named probability mass function (PMF)
describing one selected graph summary. This provides a standardized bridge
between graph objects and divergence functions such as
jensen.shannon.divergence().
Supported v1 summaries are:
"degree_distribution"
"edge_weight_distribution"
"component_size_distribution"
"neighborhood_label_distribution"
"component_size_distribution" is included primarily as a diagnostic
for disconnectedness / fragmentation, not as a general-purpose default
stability summary.
compute.graph.summary.pmf(
graph,
summary = c("degree_distribution", "edge_weight_distribution",
"component_size_distribution", "neighborhood_label_distribution"),
labels = NULL,
weight.list = NULL,
bins = NULL,
n.bins = 20L,
bin.method = c("auto", "fixed_width", "fixed_quantile", "explicit"),
normalize = TRUE,
support = NULL,
zero.pad = TRUE,
simplify.multiple = TRUE,
directed = FALSE,
return.details = TRUE
)
graph |
Graph-like object. Supported inputs are:
|
summary |
Summary type to compute. |
labels |
Optional label vector used for
|
weight.list |
Optional edge-weight list used when |
bins |
Optional numeric vector of histogram breaks used for
|
n.bins |
Integer number of bins used when |
bin.method |
Character string controlling automatic bin construction for
|
normalize |
Logical; if |
support |
Optional support to align the resulting PMF to. |
zero.pad |
Logical; if |
simplify.multiple |
Logical; if |
directed |
Logical; if |
return.details |
Logical; if |
If return.details = TRUE, a list with fields:
summary: summary type used.
pmf: named probability mass function.
support: support of the PMF.
counts: named raw-count vector before normalization.
metadata: list of summary-specific metadata.
Otherwise, returns the named PMF vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.