compute.graph.summary.stability: Compute graph-summary stability across a graph sequence

View source: R/graph_summary_divergence.R

compute.graph.summary.stabilityR Documentation

Compute graph-summary stability across a graph sequence

Description

Computes a divergence-based stability curve across consecutive graphs in a sequence. This function provides a generalized sequence-level analogue of the degree-profile Jensen-Shannon calculation currently used in compute.stability.metrics().

Usage

compute.graph.summary.stability(
  graphs,
  summary = c("degree_distribution", "edge_weight_distribution",
    "component_size_distribution", "neighborhood_label_distribution"),
  divergence = c("js"),
  labels = NULL,
  summary.args = list(),
  k.values = NULL,
  graph.type = c("geom", "isize"),
  return.details = TRUE
)

Arguments

graphs

Either a list of graph-like objects or an object of class "iknn_graphs".

summary

Summary type to compare across consecutive graph pairs.

divergence

Divergence type. Currently only "js".

labels

Optional shared vertex-label vector used for "neighborhood_label_distribution".

summary.args

Optional named list forwarded to graph.summary.divergence().

k.values

Optional integer vector of k values. If graphs is an "iknn_graphs" object and k.values is NULL, the values are derived from its kmin and kmax attributes.

graph.type

If graphs is an "iknn_graphs" object, choose either "geom" or "isize".

return.details

Logical; if TRUE, return a structured list.

Value

If return.details = TRUE, a list with fields:

  • summary: summary type used.

  • divergence: divergence type used.

  • k.values: full k sequence.

  • k.transition.values: k values corresponding to consecutive-graph transitions.

  • values: vector of divergence values of length length(k.values) - 1.

  • details: optional pairwise details for each transition.

Otherwise, returns only the divergence vector.


dgraphs documentation built on Aug. 21, 2026, 1:08 a.m.