Replies: 7 comments 11 replies
-
Ok. I've confirmed that using So I'm now seeing if Can someone suggest an output format which was implemented to include the layer information? |
Beta Was this translation helpful? Give feedback.
-
After maybe 15 minutes, ---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Input In [22], in <module>
1 module_layers_outpath_json = module_layers_outpath_pajek.with_suffix('.json')
----> 2 im.write_json(str(module_layers_outpath_json))
File /usr/local/lib64/python3.8/site-packages/infomap.py:6650, in Infomap.write_json(self, filename, states)
6636 def write_json(self, filename, states=False):
6637 """Write result to a JSON file.
6638
6639 See Also
(...)
6648 If the state nodes should be included. Default ``False``.
6649 """
-> 6650 return self.writeJsonTree(filename, states)
File /usr/local/lib64/python3.8/site-packages/infomap.py:3303, in InfomapBase.writeJsonTree(self, *args)
3302 def writeJsonTree(self, *args):
-> 3303 return _infomap.InfomapBase_writeJsonTree(self, *args)
RuntimeError: std::bad_alloc Is that function going to need more than the ~160G of memory (and 3.6P of disk space) I have free? |
Beta Was this translation helpful? Give feedback.
-
Looks like I've got . . . > infomap --version
Infomap version 2.1.0 compiled with OpenMP
See www.mapequation.org for terms of use. I guess I'll see if I can get Pypi v 2.2.0, and see if any updates fixes things for me. |
Beta Was this translation helpful? Give feedback.
-
Hi and thanks for reaching out!
Why do you want to print the pajek file? It's not needed to run Infomap if you use the Python module. I'll move this to a discussion post and create a separate issue for the write_json bug for now. Please let us know if you have any questions. |
Beta Was this translation helpful? Give feedback.
-
@antoneri , Thanks for taking the time to respond with all the useful information and examples! |
Beta Was this translation helpful? Give feedback.
-
I don't know if this is the best place (topic, under which) to continue asking things. Anyway, I was a little hopeful and surprised to see the 'preferred_number_of_modules' parameter, as a possible easy way to get to our target. But when I set that to 40, for example, I see things like . . . |
Beta Was this translation helpful? Give feedback.
-
This looks much better to me!
I actually kept I've been reading the docs, but I'm not completely clear on how to show those top "(30 non-trivial) modules". Also, how might I filter for only the modules which include at least one of our nodes of interest? Thanks so much for your time! |
Beta Was this translation helpful? Give feedback.
-
I've created a map, and done a bunch of . . .
add_multilayer_intra_link
calls.But
write_pajek
includes no "*Intra" section (nor any Multilayer additional information, at all.)If that exporter doesn't support that, can you point out which one does?
Maybe
write_json
?I guess I can test and see . . .
Perhaps I am just misunderstanding the scope/capabilities of infomap.
Would it work if I just used
add_multilayer_link
, but with the same layer id?I'm wondering if since "Multilayer" is not optional in the pajek spec, if the Infomap object might not even initialize that member/attribute if something with 'multilayer' in the function name is never called.
Basically I have some semantic information which can allow grouping Vertices into layers. I was hoping to use the Infomap functions to integrate this with some binary relationship information (e.g. which can be used to create edges).
Beta Was this translation helpful? Give feedback.
All reactions