barahona-research-group / PyGenStability

PyGenStability: Multiscale community detection with generalized Markov Stability
https://barahona-research-group.github.io/PyGenStability/
GNU General Public License v3.0
32 stars 11 forks source link

Signed combinatorial constructor #75

Closed d-schindler closed 1 year ago

d-schindler commented 1 year ago

This PR is to implement a constructor based on the signed combinatorial Laplacian, see: https://github.com/michaelschaub/generalizedLouvain/blob/master/MATLAB/quality_functions/louvain_signedLap.m

d-schindler commented 1 year ago

I'm confused about the null model, in https://github.com/michaelschaub/generalizedLouvain/blob/1d3e73b30ec2ce8edac44a300f5a767050048230/MATLAB/quality_functions/louvain_signedLap.m#L49 it seems to depend on the scale.

We should also create an example notebook for signed graphs.

d-schindler commented 1 year ago

I implemented signed_combinatorial now with 0 as the null model, as suggested by Michael.

I also added the signed network from the Harari data as an example and applied both signed_modularity and signed_combinatorial constructors. They seem to work and the clusters seem to correspond to the ones in the PRE paper according to the labels, but maybe @arnaudon can double-check?

d-schindler commented 1 year ago

I think this is ready to merge after your checks, @arnaudon

d-schindler commented 1 year ago

@arnaudon , is there anything else you want me to do here?