compare_Target {netcom}R Documentation

Compare Networks One-to-Many

Description

Compares one network to a list of many networks.

Usage

compare_Target(
  target,
  networks,
  net_size,
  net_kind = "matrix",
  method = "DD",
  cause_orientation = "row",
  DD_kind = "all",
  DD_weight = 1,
  max_norm = FALSE,
  cores = 1,
  verbose = FALSE
)

Arguments

target

The network be compared.

networks

The networks being compared to the target network

net_size

Size

net_kind

If the network is an adjacency matrix ("matrix") or an edge list ("list"). Defaults to "matrix".

method

This determines the method used to compare networks at the heart of the classification. Currently "DD" (Degree Distribution) and "align" (the align function which compares networks by the entropy of diffusion on them) are supported. Future versions will allow user-defined methods. Defaults to "DD".

cause_orientation

= The orientation of directed adjacency matrices. Defaults to "row".

DD_kind

= A vector of network properties to be used to compare networks. Defaults to "all", which is the average of the in- and out-degrees.

DD_weight

= Weights of each network property in DD_kind. Defaults to 1, which is equal weighting for each property.

max_norm

Binary variable indicating if each network property should be normalized so its max value (if a node-level property) is one. Defaults to FALSE.

cores

Defaults to 1. The number of cores to run the classification on. When set to 1 parallelization will be ignored.

verbose

Defaults to TRUE. Whether to print all messages.

Details

Note: Currently each process is assumed to have a single governing parameter.

Value

A pseudo-distance vector where the i-element is the comparison between the target network and the ith network being compared to.

References

Langendorf, R. E., & Burgess, M. G. (2020). Empirically Classifying Network Mechanisms. arXiv preprint arXiv:2012.15863.

Examples

# Import netcom
library(netcom)

# Adjacency matrix
size <- 10
comparisons <- 50
network_target <- matrix(sample(c(0,1), size = size^2, replace = TRUE), nrow = size, ncol = size)
network_others <- list()
for (net in 1:comparisons) {
     network_others[[net]] = matrix(
         sample(
             c(0,1),
             size = size^2,
             replace = TRUE),
         nrow = size,
         ncol = size)
}
compare_Target(target = network_target, networks = network_others, net_size = size, method = "DD")


[Package netcom version 2.1.7 Index]