run_infomap_multilayer: Run Infomap for multilayer networks

View source: R/run_infomap_multilayer.R

run_infomap_multilayerR Documentation

Run Infomap for multilayer networks

Description

Run Infomap for multilayer networks using a multilayer class object. Returns the value of the map equation and a tibble with module affiliations that includes additional node metadata (if exists).

Usage

run_infomap_multilayer(
  M,
  infomap_executable = "Infomap",
  flow_model = NULL,
  silent = T,
  trials = 100,
  seed = NULL,
  relax = F,
  multilayer_relax_rate = 0.1,
  multilayer_relax_limit = NULL,
  multilayer_relax_limit_up = NULL,
  multilayer_relax_limit_down = NULL,
  temporal_network = F,
  run_standalone = T,
  remove_auxilary_files = T,
  ...
)

Arguments

M

An object of class multilayer (see package emln for definition).

infomap_executable

Name of Infomap standalone file (default is Infomap).

flow_model

See details in https://www.mapequation.org/infomap/#ParamsAlgorithm.

silent

Run in silent mode (argumnt –silent in Infomap).

trials

Number of trials to run (argumnt -N in Infomap).

seed

Seed value for random number generation (argumnt –seed in Infomap).

relax

Should dynamics of movement between layers be fully encoded by interlayer edges, or should they be relaxed. See details.

multilayer_relax_rate

Probability to relax the constraint to move only in the current layer.

multilayer_relax_limit

Number of neighboring layers in each direction to relax to. If negative, relax to any layer.

multilayer_relax_limit_up

Number of neighboring layers with higher id to relax to. If negative, relax to any layer. Useful for temporal networks.

multilayer_relax_limit_down

Number of neighboring layers with lower id to relax to. If negative, relax to any layer. Useful for temporal networks.

temporal_network

Is this a temporal network? See details.

run_standalone

Should the function run Infomap's stand-alone file? Defaults to true. See details.

remove_auxilary_files

Should auxilary files be removed when finished running?

...

additional Infomap arguments as detailed in https://www.mapequation.org/infomap/#Parameters

Details

Currently only works with two-level solutions (no modules within modules).

When relax=F, Infomap uses an input format that gives full control of the dynamics, explicitly using interlayer edges, and no other movements are encoded. This uses the extended edge list format and you have to specify all intra-layer and inter-layer links explicitly.

However, it is often useful to consider a dynamics in which a random walker moves within a layer and with a given relax rate jumps to another layer without recording this movement, such that the constraints from moving in different layers can be gradually relaxed. This is obtained with a different input format that explicitly divides the links into intra-layer and inter-layer links. To use relaxation, you only specify intralayer edges (use 'intra_output_extended=F' in 'create_multilayer_object') and the links between layers are generated automatically by inter-layer relaxation (parameter 'multilayer-relax-rate'). Relaxing between layers can also be constraied by interlayer links. For this, include interlayer links and set 'inter_output_extended=F' in 'create_multilayer_object'. Relaxing requires specification of relax rates and limits. When these are not specified, Infomap uses defaults as detailed here.

If the multilayer is a temporal network, modules can be renamed to be placed in temporal order of appearance. This is done with temporal_network=T.

run_standalone: Infomap is run as a stand-alone file. On some machines, especially Windows, it is impossible to install that file or it gives an error. In that case you can use the auxilary file produced by the function, called infomap_multilayer.txt to run Infomap online, download the results and parse them back. The function will wait to parse the results.

Value

An object of class infomap_multilayer

See Also

create_multilayer_object, multilayer, infomap_multilayer

Examples

 # Examples are available on the our website 
 # https://ecological-complexity-lab.github.io/infomap_ecology_package/multilayer_relax_emln.html


  

Ecological-Complexity-Lab/infomap_ecology_package documentation built on June 6, 2024, 5:28 a.m.