Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Democratic Estimate of the Modular Organization of a Network #1560

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

aitoralmeida
Copy link
Contributor

Flat Merge version of DEMON (Democratic Estimate of the Modular Organization of a Network) algorithm as described in:

Michele Coscia, Giulio Rossetti, Fosca Giannotti, Dino Pedreschi:
DEMON: a local-first discovery method for overlapping communities.
KDD 2012:615-623

DEMON uses a local-first approach to community discovery were each node democratically votes for the communities that it sees in its surroundings. It provides a deterministic, fully incremental method for community discovery that has a limited time complexity.

Based on the implementation by Giulio Rossetti giulio.rossetti@isti.cnr.it: http://www.michelecoscia.com/wp-content/uploads/2013/07/demon_py.zip

@@ -1 +1,2 @@
from networkx.algorithms.community.kclique import *
from networkx.algorithms.community.demon import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alphabetize this, and add the missing newline.

@jfinkels
Copy link
Contributor

Quoting one of @aitoralmeida's comments:

I contacted both Michele Coscia and Giulio Rossetti before starting with this. They were kind enough to license their implementation of DEMON with a MIT license so I could add it to networkx (here). Should I put this somehow in the documentation or the comments?

Not only should you, you must. NetworkX is published under a BSD license, not an MIT license. If you are creating a derivative work of an MIT licensed program, you must adhere to the requirements of the MIT license (you can find the full text of the license at the head of the file Demon.py in the zip archive to which you linked):

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

@aitoralmeida
Copy link
Contributor Author

Not only should you, you must. NetworkX is published under a BSD license, not an MIT license. If you
are creating a derivative work of an MIT licensed program, you must adhere to the requirements of
the MIT license (you can find the full text of the license at the head of the file Demon.py in the zip
archive to which you linked):

So adding the same MIT license to the document would be enough? Would it be a problem if it has a different license? Or should I just close the pull request? Sorry for the mesh.

@jfinkels
Copy link
Contributor

I think adding the license to that particular module is sufficient, but I'd like to get someone else to back me up on that. I don't think it is a problem to have an MIT licensed module in a BSD licensed project, but again, I'd like to see what other people prefer.

@aitoralmeida
Copy link
Contributor Author

@jfinkels I talked with Michele and Giulio and they have re-licensed their code with the BSD license (http://www.giuliorossetti.net/about/ongoing-works/software-en/demon/) to make it easier the integration of their algorithm in networkx. I have fixed the license accordingly adding their names.

This should solve the license problems. Code-wise I think that it would be ready for integration.


for ego in G:
# EgoMinusEgo and LabelPropagation phase
ego_minus_ego = nx.ego_graph(G, ego, 1, False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to just do G.subgraph(G[ego]).

@jfinkels
Copy link
Contributor

Maybe the _overlapping_label_propagation() function should live in the same module as the function proposed in #1559, specifically a networkx.algorithms.label_propagation module, since it seems to be very similar to the other label propagation algorithms.

@hagberg hagberg added this to the networkx-future milestone Dec 27, 2015
Base automatically changed from master to main March 4, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants