Replies: 4 comments 9 replies
-
Hi, and thanks for reaching out! It sounds like you have a good understanding of the basic workflow. There's currently no way to assign weights to the generated multilayer states as they are opaque to the user when running Infomap. One way to get around this is to output the generated state network with Before adding weights to the generated state network, a good check is to ensure that the resulting modules are the same as when using the multilayer input! With This is all kinds of contrived, but it's the only thing I can come up with now that directly solves your problem! Of course, you can avoid this by directly modeling your data as a state network to have complete control. I hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi Anton, I started to try your suggestion and state network generation works fine with the command you wrote above. However, I am still not sure how to exploit the bitshift trick. I am well aware what it does and how it works but in order to really be sure I get the right layerId back I also tried to infer the stateId from the nodeId and the layerId. According to the code this is computed as
but implementing this myself and also writing it down on paper already yields different results for very small nodeIds e.g. for I am using the python API to interact with Infomap with the following lines of code:
The output is also as expected:
Do you have any clue why this difference arises? |
Beta Was this translation helpful? Give feedback.
-
Very, very strange and interesting behaviour.
which, if you compare it to the previous one has a different number of state nodes generated (1036 compared to 520 previous which I was already suspicious about tbh because this does not sum up to 3 * 346 = 1036 as I have 346 nodes per layer). The generated state network now also looks correct
|
Beta Was this translation helpful? Give feedback.
-
this is the output I get when running the example with my local version
which is again quite different than what the online version gives. So there seems to be some problem either with the ingestion of the file |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to use infomap to find communities in a multilayer network of metabolites. In this regard each layer represents the pairwise correlation network of metabolites for the given timepoint and interlayer links are pairwise correlations of metabolites between successive timepoints.
Setting up the network and running the algorithm works pretty well using the multilayer Pajek file format but I also wanted to somehow reflect the metabolic state of the organism at a given timepoint by assigning weights to nodes. After reading through the documentation and digging through the code I found that this is possible when using the state Pajek file format where one can specify
state_id node_id name weight
in the*states
section of the file. However, although this works fine I feel like this completely disregards the layers of the network and results in all state nodes being assigned to their own cluster unless I use a very high markov time.Is there any way to use the multilayer format and assign weights to state nodes and use this for module detection or am I doing everything they way it is intended already and just don't understand the algorithm enough?
Thanks for the reply in advance and best regards,
Daniel
Beta Was this translation helpful? Give feedback.
All reactions