Help with directed movements and self-links in clusters_infomap

Hello everyone!

I am in the process of creating an R package and I am hoping to incorporate infomap community detection into this package. Following mapequation.org I have previously used Ubuntu to calculate infomap communities and I am hoping to integrate igraph’s “cluster_infomap” function into my package so users do not have to leave R to identify infomap communities. The cluster_infomap function seems to be fairly similar to the methods I have used in Ubuntu, but I can’t tell if users are able to allow self-links or directed movements. Are these features available in the current function, or are they something the authors might consider adding in the future?

Thank you very much for your help!

Sincerely,
Hannah

igraph uses the original implementation written by InfoMAP’s authors, but a rather old version of it. Newer versions (which you find on mapequation.org), use the AGPL license, which is not compatible with igraph’s GPLv2 license.

I looked at the code, and it appears that the conversion from igraph to infomap format explicitly excludes self-loops.

I do not know why it was done this way, as the infomap code does appear to support loops. It may be possible to relax this restriction.

Directed edges are supported.

The infomap code in igraph is unlikely to see much work in the future, other than fixing bugs: because of the incompatible license, I believe we cannot integrate the new code from mapequation.org (at least not without re-licensing all of igraph as AGPL). A complete re-implementation would take too much resources. Of course, a volunteer might step up and do it …

There is some more information here:

https://lists.nongnu.org/archive/html/igraph-help/2016-07/msg00001.html

@vtraag You are more familiar with infomap. Is enabling self-loops something that would be appropriate / useful? If so, should there be an option for it (API breaking)?

In principle, such self-loops might be useful. I am not sure what is the reason for excluding them in the first place though, perhaps it raised some issues. Anyway, we can check it I think.

In the documentation of the old version (but still newer than ours), there’s this:

https://www.mapequation.org/code_old.html

-k --include-self-links
Include links with the same source and target node. (Ignored by default.)

I thought there must be a reason they are ignored by default in the official implementation.

Dear all,

Thank you very much for the valuable feedback! It’s too bad about the license issues, but that makes sense. I’m glad to hear directed movements are supported and I was able to find that option on the “make_graph” function manual pages so thank you for that.

In response to the self-loop feature, the reason we need to allow self-loops this is that we’re working with animal satellite tag data and while most of the animals move around regularly, sometimes they stay in 1 area for a while and in which case we need to recognize this lack of movement as well. If this is a feature that could be enabled in the function it would be great and we’d be happy to showcase this function in our package! Thanks again for your time and help here!

Best,
Hannah