netdis_many_to_many: Compute any of the Netdis variants between all graph pairs.

View source: R/measures_net_dis.R

netdis_many_to_manyR Documentation

Compute any of the Netdis variants between all graph pairs.

Description

Compute any of the Netdis variants between all graph pairs.

Usage

netdis_many_to_many(
  graphs = NULL,
  ref_graph = NULL,
  comparisons = "many-to-many",
  max_graphlet_size = 4,
  neighbourhood_size = 2,
  min_ego_nodes = 3,
  min_ego_edges = 1,
  binning_fn = NULL,
  bin_counts_fn = NULL,
  exp_counts_fn = NULL,
  graphlet_counts = NULL,
  graphlet_counts_ref = NULL
)

Arguments

graphs

A named list of simplified igraph graph objects (undirected graphs excluding loops, multiple edges), such as those obtained by using read_simple_graphs.

ref_graph

Controls how expected counts are calculated. Either: 1) A numeric value - used as a constant expected counts value for all query graphs. 2) A simplified igraph object - used as a reference graph from which expected counts are calculated for all query graphs. 3) NULL (default) - Expected counts will be calculated based on the properties of the query graphs themselves. (Geometric-Poisson approximation).

comparisons

Which comparisons to perform between graphs. Can be "many-to-many" (all pairwise combinations) or "one-to-many" (compare first graph in graphs to all other graphs.)

max_graphlet_size

Generate graphlets up to this size. Currently only 4 (default) and 5 are supported.

neighbourhood_size

Ego network neighbourhood size (default 2).

min_ego_nodes

Filter ego networks which have fewer than min_ego_nodes nodes (default 3).

min_ego_edges

Filter ego networks which have fewer than min_ego_edges edges (default 1).

binning_fn

Function used to bin ego network densities. Takes edge densities as its single argument, and returns a named list including, the input densities, the resulting bin breaks (vector of density bin limits), and the vector interval_indexes which states to what bin each of the individual elements in densities belongs to. ego network). If NULL, then the method binned_densities_adaptive with min_counts_per_interval = 5 and num_intervals = 100 is used (default: NULL).

bin_counts_fn

Function used to calculate expected graphlet counts in each density bin. Takes graphlet_counts, interval_indexes (bin indexes) and max_graphlet_size as arguments. If bin_counts_fn is NULL, (default), it will apply either the approach from the original Netdis paper, or the respective Geometric-Poisson approximation; depending on the values of ref_graph and graphlet_counts_ref.

exp_counts_fn

Function used to map from binned reference counts to expected counts for each graphlet in each ego network of the query graphs. Takes ego_networks, density_bin_breaks, binned_graphlet_counts, and max_graphlet_size as arguments. If exp_counts_fn is NULL, (default), it will apply either the approach from the original Netdis paper, or the respective Geometric-Poisson approximation; depending on the values of ref_graph and graphlet_counts_ref.

graphlet_counts

Pre-generated graphlet counts (default: NULL). If the graphlet_counts argument is defined then graphs will not be used. A named list of matrices containing counts of each graphlet (columns) for each ego-network (rows) in the input graph. Columns are labelled with graphlet IDs and rows are labelled with the ID of the central node in each ego-network. As well as graphlet counts, each matrix must contain an additional column labelled "N" including the node count for each ego network.

graphlet_counts_ref

Pre-generated reference graphlet counts (default: NULL). Matrix containing counts of each graphlet (columns) for each ego-network (rows) in the input graph. Columns are labelled with graphlet IDs and rows are labelled with the ID of the central node in each ego-network. As well as graphlet counts, each matrix must contain an additional column labelled "N" including the node count for each ego network. If the graphlet_counts_ref argument is defined then ref_graph will not be used.

Value

Netdis statistics between query graphs for graphlet sizes up to and including max_graphlet_size.


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