Repository navigation
Adding non-randomness measures for graphs - #3515
Conversation
|
Thanks for this! I've got a number of comments below. Module/file header: take a look at the networkx github wiki for our standard header/copyright/author recognition. Not all our files have it but we are working toward that. Check the PEP8 code style using pycodestyle (used to be called pep8). Most changes will be spaces after commas, length of lines, indenting and stuff like that. In your import of numpy you call your function hits_numpy. :) You should probably also rearrange that 2 line exception to make the first line define the error string and the second raise the exception: Code Define the value for Eqn 4.5 on its own line. Then put that into the return statement. :) |
|
Thanks Dan, hope I fixed all regarding your comments. Pushed again. |
|
Thanks -- looks good. Can you add the NetworkX people to the copyright? Can you check Pycodestyle again (spaces after commas and between operators) |
|
yes indeed, pycodestyle was not returning errors since those typos were in the comment section. |
|
Don't lines 78 and 81 in non_randomness also get flagged by pycodestyle? They have lots of operations without spaces around them. |
|
Fixed. No was not flagging weirdly.. (pip 19.1.1 & pycodestyle 2.4.0 under ubuntu) |
|
Thanks! |
Hello all,
implementation of the non-randomness measures from:
Xiaowei Ying and Xintao Wu, On Randomness Measures for Social Networks,
SIAM International Conference on Data Mining. 2009
The idea of the measures is to quantify how to which extent the inspected graph is carrying communities (first measure) or far from a ER random graph (second one), through a simple float each time.