gdd_for_all_graphs: Load all graphs in a directory and calculates their...

View source: R/orca_interface.R

gdd_for_all_graphsR Documentation

Load all graphs in a directory and calculates their Graphlet-based Degree Distributions (GDDs)

Description

Loads graphs from all files matching the given pattern in the given directory, converts them to indexed edge lists compatible with the ORCA fast orbit counting package and calculates the specified set of graphlet-based degree distributions usingthe ORCA package.

Usage

gdd_for_all_graphs(
  source_dir,
  format = "ncol",
  pattern = ".txt",
  feature_type = "orbit",
  max_graphlet_size = 4,
  ego_neighbourhood_size = 0,
  mc.cores = getOption("mc.cores", 2L)
)

Arguments

source_dir

Path to graph directory

format

Format of graph files

pattern

Filename pattern to match graph files

feature_type

Type of graphlet-based degree distributions. Can be graphlet to count graphlets or orbit to count orbits.

max_graphlet_size

Maximum size of graphlets to use when generating GDD. Currently only size 4 and 5 are supported.

ego_neighbourhood_size

The number of steps from the source node used to select the neighboring nodes to be included in the source node ego-network. If set to 0, ego-networks will not be used.

mc.cores

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

Value

A named list where each element contains a set of GDDs for a single

A named list where each element contains a set of GDDs for a single graph from the source directory. Each set of GDDs is itself a named list, where each GDD element is a dhist discrete histogram object.


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