patapizza / pylouvain

A Python implementation of the Louvain method to find communities in large networks
110 stars 76 forks source link

Output #1

Closed dinos66 closed 11 years ago

dinos66 commented 11 years ago

Please forgive my ignorance but i cannot understand the output. What do the numbers represent? I tried giving usernames dennis dinos 1 lena lola 1 scot steve 1 and numbers 7399 5 1 2952 7 1 6841 7 1 as input (vertices) in order to understand but i've yet to discover what the integers in the communities of the "partition" variable stand for. I can see that there is an ordering of some sort in the in_order function but i don't get why and what's really going on. Could you please help?

patapizza commented 11 years ago

Hello! Sorry for my late reply; I haven't actually got any notification from this issue.

PyLouvain requires as input a data file having each line containing two integers, which states there exists an edge between both integers. Vertices are automatically induced from edges. The sole purpose of in_order is to reassign proper indexes to vertices starting from 0, for convenience. So each integer from the partition variable is a vertex, denoted by its new index.

Feel free to ask for further details if anything remains unclear.

dinos66 commented 11 years ago

Hi! So it only works with integers? I gave it strings and it didn't seem to compain. Of  course the results where all over the place and even more, the were integers. So i was wondering what the connection between the integers in the result and the strings from my original file would be. It could be that my vertices are sorted alphabetically and as such assigned an index number. Could it?

Thank you for answering!

All the best,

Konstantinos


From: patapizza notifications@github.com To: patapizza/pylouvain pylouvain@noreply.github.com Cc: dinos66 dinos66@yahoo.com Sent: Tuesday, July 9, 2013 10:38 PM Subject: Re: [pylouvain] Output (#1)

Hello! Sorry for my late reply; I haven't actually got any notification from this issue. PyLouvain requires as input a data file having each line containing two integers, which states there exists an edge between both integers. Vertices are automatically induced from edges. The sole purpose of in_order is to reassign proper indexes to vertices starting from 0, for convenience. So each integer from the partition variable is a vertex, denoted by its new index. Feel free to ask for further details if anything remains unclear. — Reply to this email directly or view it on GitHub.

patapizza commented 11 years ago

Hey,

This is exactly what it does: vertices are alphabetically sorted (whether there are of string type or integer or whatever) before being indexed by an integer, starting from 0.

dinos66 commented 11 years ago

Thank you very much! I was hoping that it did that!

Cheers!


From: patapizza notifications@github.com To: patapizza/pylouvain pylouvain@noreply.github.com Cc: dinos66 dinos66@yahoo.com Sent: Wednesday, July 17, 2013 6:50 PM Subject: Re: [pylouvain] Output (#1)

Hey, This is exactly what it does: vertices are alphabetically sorted (whether there are of string type or integer or whatever) before being indexed by an integer, starting from 0. — Reply to this email directly or view it on GitHub.