netemd_many_to_many: NetEMDs between all graph pairs using provided Graphlet-based...

View source: R/measures_net_emd.R

netemd_many_to_manyR Documentation

NetEMDs between all graph pairs using provided Graphlet-based Degree Distributions

Description

NetEMDs between all graph pairs using provided Graphlet-based Degree Distributions

Usage

netemd_many_to_many(
  graphs = NULL,
  dhists = NULL,
  method = "optimise",
  smoothing_window_width = 0,
  return_details = FALSE,
  mc.cores = getOption("mc.cores", 2L),
  feature_type = "orbit",
  max_graphlet_size = 5,
  ego_neighbourhood_size = 0
)

Arguments

graphs

A list of network/graph objects from the igraph package. graphs can be set to NULL (default) if dhists is provided.

dhists

A list whose elements contain either: A list of dhist discrete histogram objects for each graph, or a list a matrix of network features (each column representing a feature). dhists can be set to NULL (default) if graphs is provided. A dhist object can be obtained from graph_features_to_histograms.

method

The method to use to find the minimum EMD across all potential offsets for each pair of histograms. Default is "optimise" to use R's built-in stats::optimise method to efficiently find the offset with the minimal EMD. However, this is not guaranteed to find the global minimum if multiple local minima EMDs exist. You can alternatively specify the "exhaustive" method, which will exhaustively evaluate the EMD between the histograms at all offsets that are candidates for the minimal EMD.

smoothing_window_width

Width of "top-hat" smoothing window to apply to "smear" point masses across a finite width in the real domain. Default is 0, which results in no smoothing. Care should be taken to select a smoothing_window_width that is appropriate for the discrete domain (e.g.for the integer domain a width of 1 is the natural choice).

return_details

Logical indicating whether to return the individual minimal EMDs and associated offsets for all pairs of histograms

mc.cores

Number of cores to use for parallel processing. Defaults to the mc.cores option set in the R environment.

feature_type

Type of graphlet-based feature to count: "graphlet" counts the number of graphlets each node participates in; "orbit" (default) calculates the number of graphlet orbits each node participates in.

max_graphlet_size

Determines the maximum size of graphlets to count. Only graphlets containing up to max_graphlet_size nodes will be counted. Possible values are 4, and 5 (default).

ego_neighbourhood_size

The number of steps from the source node to include nodes for each ego-network. NetEmd was proposed for individual nodes alone, hence the default value is 0.

Value

NetEMD measures between all pairs of graphs for which features were provided. Format of returned data depends on the return_details parameter. If set to FALSE, a list is returned with the following named elements:net_emd: a vector of NetEMDs for each pair of graphs, comp_spec: a comparison specification table containing the graph names and indices within the input GDD list for each pair of graphs compared. If return_details is set to FALSE, the list also contains the following matrices for each graph pair: min_emds: the minimal EMD for each GDD used to compute the NetEMD, min_offsets: the associated offsets giving the minimal EMD for each GDD


alan-turing-institute/network-comparison documentation built on June 7, 2022, 10:41 p.m.