infomap_ecology_package icon indicating copy to clipboard operation
infomap_ecology_package copied to clipboard

function "create_multilayer_object"??

Open mar-iana opened this issue 1 year ago • 3 comments

Could not find function "create_multilayer_object" in R, neither in this repository, what has happened with it? Thanks in advance

mar-iana avatar Nov 15 '24 15:11 mar-iana

Did you install the last version? Here is the new website: https://ecological-complexity-lab.github.io/infomap_ecology_package/installation.html The infomapecology package now depends on elmn package so you need to install it too. And the function is called create_multilayer_network; see: https://ecological-complexity-lab.github.io/emln_package/multilayer.html

shainova avatar Nov 16 '24 07:11 shainova

Hi, thank you so much for your response! I’m almost sure I have the latest version installed, as I installed it a month ago, and I’m already using the create_multilayer_network function. The reason I was looking for the create_multilayer_object function was to set the arguments intra_output_extended=F and inter_output_extended=F, as suggested in the details of the function’s help section in R, in order to run run_infomap with relax=TRUE, which allows me to move between layers.

From what I’ve been exploring, if I don’t include the interlayer object in the create_multilayer_network function (i.e., interlayer_links = NULL), it is possible to achieve this result. But if I also want to include it and make the probability of random walks between layers possible but constrained by interlayer links, is that possible? Does the function, when creating a multilayer object with interlayer links, actually do precisely this?

Thanks again, and best regards, Mariana

mar-iana avatar Nov 16 '24 19:11 mar-iana

Can you include a minimal working example of your code? something we can copy-paste and run. @Geutg will take it from here.

shainova avatar Nov 25 '24 14:11 shainova

Hi, If you wish to allow the random walker to move between layers you have 2 options

  1. Use interlayer edges - by passing them using interlayer_links param into create_multilayer_network() and setting relax as FALSE in run_infomap_multilayer(). With this the random walker is only able to use the edges you supply to move between layers.
  2. relax layer constraints - setting relax as TRUE in run_infomap_multilayer. This allows the random walker to move between the node states of the same physical node across layers, with a given rate (multilayer_relax_rate). Note: the interlayer edges are not ignored.

I hope this clarifies the answer.

create_multilayer_network is the newer iteration of create_multilayer_object that was deprecated when splitting the package into two. If there are inconsistencies working with the newer iteration it will be fixed.

Geutg avatar Jul 24 '25 13:07 Geutg