neo4j / graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
https://neo4j.com/docs/graph-data-science/current/
Other
621 stars 160 forks source link

Add `minCommunitySize` to non-LPA community detection algorithms #243

Closed FlorentinD closed 1 year ago

FlorentinD commented 1 year ago

Is your feature request related to a problem? Please describe.

For Label Propagation and Louvain, we added the minCommunitySize to its write mode (example).

Describe the solution you would like

Additionally the minCommunitySize parameter could be exposed to:

Additional context

The logic for the minComponentSize|minCommunitySize is contained inside the CommunityProcCompanion.

If you want to work on this issue please drop a comment :)

airtyon commented 1 year ago

hey @FlorentinD, I would like to give this one a try. I will ask here if I have any questions.

airtyon commented 1 year ago

hey @FlorentinD, will the new attributes be added to the stream & write mode of the listed algorithms(except the last 2 items) or just to the write mode? if it's the latest, I noticed that Approximate Maximum k-cut, doesn't a write mode. thank you.

FlorentinD commented 1 year ago

Hey @airtyon , I would say we can also add it to the stream modes. If you like, you could also just do the write modes and we can adjust the checklist to reflect what is left after your PR :)

Thanks for picking this up!

airtyon commented 1 year ago

hey @FlorentinD, I completed the write mode for the algorithms listed above, I have some doubts regarding Triangle Count & K1-coloring.

the reason I am commenting is that after adding minCommunitySize to Louvain in stream mode and afterwards trying to extends the tests and altering the value of minCommunitySize; I didn't see any change in the final output.

it is obvious that I have a knowledge gap somewhere but I can't pinpoint it.

I hope what I wrote makes sense.

FlorentinD commented 1 year ago

Hey @airtyon , Great to hear you could make progress!

How about you create a draft pull request with what you currently have? Then it's easier to help you :)

airtyon commented 1 year ago

@FlorentinD draft PR : https://github.com/neo4j/graph-data-science/pull/245 thank you :)