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

Effect of edge weights in resulting communities #18

Open
paula-tataru opened this issue Jan 11, 2021 · 0 comments
Open

Effect of edge weights in resulting communities #18

paula-tataru opened this issue Jan 11, 2021 · 0 comments

Comments

@paula-tataru
Copy link

Hi,

Thank you for developing this nice library! I have been trying to understand how weights affect the resulting detected communities and I found something which I did not expect.

Using the example graph you provided in the readme file, I created two versions containing weights on the edges - the edge weights in one version are scaled by a constant relative to the other version:

v1:

0	1	1
1	2	1
2	0	1
2	3	0.5
3	5	1
5	4	1
4	3	1

v2:

0	1	4
1	2	4
2	0	4
2	3	2
3	5	4
5	4	4
4	3	4

I ran the Leiden algorithm using the following options
java -cp networkanalysis-1.1.0.jar nl.cwts.networkanalysis.run.RunNetworkClustering -r 0.2 -w

For v1, the same communities are detected as for the example in the readme file:

0	0
1	0
2	0
3	1
4	1
5	1

For v2, all nodes are part of one community:

0	0
1	0
2	0
3	0
4	0
5	0

I found this a bit surprising, as I didn't expect the scale of the weights to be so important and I expected to obtain the same results for these two networks.

I can see that in v1.1 of the library, two normalization methods have been introduced for the edge weights, but I couldn't find an explanation for why / when this might be needed and how the different normalization methods might impact the result.

Would it be possible to provide a brief explanation for this?

Thank you.

Best,
Paula Tataru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant