bctpy icon indicating copy to clipboard operation
bctpy copied to clipboard

Bugs in matching index, topological overlap,local efficiency and louvain

Open hrpereira opened this issue 4 years ago • 0 comments

Hi all, I hope that this issue report finds you well.

I've been using your toolbox for one research project, and I just found some minor bugs in the calculation of four metrics. If I misunderstood the initial parameters in each function, please let me know. I feel that I should aware you of these bugs to aid you in improving the toolbox.

Here are the bugs that I found: I attached the file that allow me to compared your functions with the BCT-MATLAB toolbox:

  1. Topological Overlap: according to the literature and its formula, the diagonal matrix should be equal to 1. Nevertheless, in your case, the matrix takes values less than one. I guess that is due to this 'minus' sign in one line of your code (please see the function top_ovlp(adj,nr_steps) at line 33 in metrics_bugs.py)

  2. Matching index: The calculum of the matching index indicates that the output is a symmetric matrix, but in your code we obtain a symmetric matrix. (please see the function match_idx(CIJ0) at line 68 in metrics_bugs.py)

  3. Local efficiency and Louvain: here, I didn't find any bug, but I had to set the diagonal of my initial matrix to zero, to get what I think is the supposed output. (please see the file metrics.py lines 117 to 123)

I hope that these findings could help improve your toolbox! :)

metrics_bugs.txt

Take care, Best regards

hrpereira avatar Feb 19 '21 11:02 hrpereira