Open zuxfoucault opened 6 years ago
This is a good point and ought to be addressed by some in code comment, which I will do. The answer to this is that the community module raises an error if it receives edges with non binarised weights (e.g weights equal to anything other than 1 or 0). It is possible that after threshold your matrix you might choose to reassign the "weight" key to some other data, this line undoes that change to submit the network to the community detection algorithm. I think a better approach would be either to create a copy with edge weights equal to one (to avoid overwriting this new data) or to warn users not to reassign that key
This probably not a bug but cause me a bit confused.
https://github.com/WhitakerLab/scona/blob/master/BrainNetworksInPython/scripts/make_graphs.py#L384 it doesn't seem to have any influence on subsequent executions?