netdis_centred_graphlet_counts: netdis_centred_graphlet_counts

View source: R/measures_net_dis.R

netdis_centred_graphlet_countsR Documentation

netdis_centred_graphlet_counts

Description

Calculate expected graphlet counts for each ego network in a query graph and centre the actual counts by subtracting those calculated expected count values.

Usage

netdis_centred_graphlet_counts(
  graphlet_counts,
  ref_ego_density_bins,
  ref_binned_graphlet_counts,
  binning_fn,
  bin_counts_fn,
  exp_counts_fn,
  max_graphlet_size
)

Arguments

graphlet_counts

Ego network graphlet counts for a query graph

ref_ego_density_bins

Either a list of previously calculated ego network density bin edges from a reference network, or NULL, in which case density bins are generated using the query graph itself.

ref_binned_graphlet_counts

Either expected graphlet counts for each ego network density bin from a reference network (a matrix with columns labelled by graphlet ID and rows by density bin index), NULL, in which case density binned counts are generated using the query graph itself, or a constant numeric value to subtract from all graphlet counts.

binning_fn

Function used to bin ego network densities. Only needed if ref_ego_density_bins and ref_binned_graphlet_counts are NULL. Takes densities as its single argument, and returns a named list including keys breaks (vector of bin edges) and interval_indexes (density bin index for each ego network).

bin_counts_fn

Function used to calculate expected graphlet counts in each density bin. Only needed if ref_ego_density_bins and ref_binned_graphlet_counts are NULL. Takes graphlet_counts, interval_indexes (bin indexes) and max_graphlet_size as arguments.

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.

max_graphlet_size

max graphlet size to calculate centred counts for. Currently only size 4 and 5 are supported.

Value

graphlet_counts minus exp_graphlet_counts for graphlets up to size max_graphlet_size.


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