GithubHelp home page GithubHelp logo

barahona-research-group / multiscalecentrality Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 8.0 1.68 MB

Graph centrality is a question of scale - Multiscale centrality (MSC) is a scale dependent measure of centrality on complex networks.

License: GNU General Public License v3.0

Python 5.91% Jupyter Notebook 94.09%

multiscalecentrality's Introduction

Multiscale Centrality

Multiscale centrality (MSC) is a scale dependent measure of centrality on complex networks.

Classic measures of graph centrality capture distinct aspects of node importance, from the local (e.g., degree) to the global (e.g., closeness). Here we exploit the connection between diffusion and geometry to introduce a multiscale centrality measure. A node is defined to be central if it breaks the metricity of the diffusion as a consequence of the effective boundaries and inhomogeneities in the graph. Our measure is naturally multiscale, as it is computed relative to graph neighborhoods within the varying time horizon of the diffusion. We find that the centrality of nodes can differ widely at different scales. In particular, our measure correlates with degree (i.e., hubs) at small scales and with closeness (i.e., bridges) at large scales, and also reveals the existence of multicentric structures in complex networks. By examining centrality across scales, our measure thus provides an evaluation of node importance relative to local and global processes on the network.

The code in this repository implements the MSC algorithm and contains a small pipeline to run examples on classic graphs.

In the Figure above we can see the results of Multiscale Centrality applied to the Karate club network and the Dolphin interaction network. The Markov time is the scaling parameter, whereby at short timescales we identify locally central nodes (such as high degree nodes) whilst at long timescales we identify globally central nodes (such as high closeness). Notice how the positions of the central nodes changes as mapped onto the original network structures.

For more information please see our published paper.

Cite

Please cite our paper if you use this code in your own work:

Arnaudon, Alexis, Robert L. Peach, and Mauricio Barahona. "Scale-dependent measure of network centrality from diffusion dynamics." Physical Review Research 2.3 (2020): 033104.

The bibtex code:

@article{arnaudon2020scale,
  title={Scale-dependent measure of network centrality from diffusion dynamics},
  author={Arnaudon, Alexis and Peach, Robert L and Barahona, Mauricio},
  journal={Physical Review Research},
  volume={2},
  number={3},
  pages={033104},
  year={2020},
  publisher={APS}
}

Installation

Required packages: numpy/scipy/matplotlib/networkx/forceatlas2 .

To install, run in the main folder:

python setup.py install

Tests

In the example folder, the script compute_multiscale_centrality.py can be used to run the benchmark examples in the paper: python compute_multiscale_centrality.py GRAPH_NAME where GRAPH_NAME could be:

  • karate
  • celegans
  • delaunay

Alternatively, the Multiscale Centrality can easily be adapted to be applied to other graphs - see the readme in the test folder.

For a quick start, check out our examples in the test/ directory.

Our other available packages

If you are interested in trying our other packages, see the below list:

  • GDR : Graph diffusion reclassification. A methodology for node classification using graph semi-supervised learning.
  • hcga : Highly comparative graph analysis. A graph analysis toolbox that performs massive feature extraction from a set of graphs, and applies supervised classification methods.
  • MSC : MultiScale Centrality: A scale dependent metric of node centrality.
  • DynGDim : Dynamic Graph Dimension: Computing the relative, local and global dimension of complex networks.
  • PyGenStability : Markov Stability: Computing the Markov Stability graph community detection algorithm in Python.
  • RMST : Relaxed Minimum Spanning Tree: Computing the relaxed minimum spanning tree to sparsify networks whilst retaining dynamic structure.
  • StEP : Spatial-temporal Epidemiological Proximity: Characterising contact in disease outbreaks via a network model of spatial-temporal proximity.

multiscalecentrality's People

Contributors

arnaudon avatar peach-lucien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

multiscalecentrality's Issues

connected componenets error

The current implementation uses the out-dated networkx command for connected_component_subgraphs. This needs updating for users, otherwise it won't work with current networkx package.

Larger Variety of Centrality Measures

There is a Centrality library called Centiserve which included a larger variety of centrality measures. Would be fun to see the correlation and accuracy of multiscale-ness of Centrality, as it seemed that Closeness and Degree Centrality is too cross-correlated.

From CentiServe in https://rdrr.io/cran/centiserve/man/:

  • averagedis | Find the average distance of a node
  • barycenter | Find the barycenter centrality score
  • bottleneck | Find the BottleNeck centrality score
  • centroid | Find the centroid value of graph vertices
  • closeness.currentflow | Find current-flow closeness centrality
  • closeness.freeman | Find the closeness centrality in a strongly connected graph
  • closeness.latora | Find the variant (Latora) closeness centrality in a...
  • closeness.residual | Find the residual closeness centrality
  • closeness.vitality | Find the closeness vitality centrality in a strongly...
  • clusterrank | Find the ClusterRank ranks in a graph
  • communibet | Find the communicability betweenness centrality
  • communitycent | Find the community-based node centrality
  • crossclique | Find the cross-clique connectivity (centrality)
  • decay | Find the decay centrality of a given vertex
  • diffusion.degree | Find the variant (Latora) closeness centrality in a...
  • dmnc | Find the density of maximum neighborhood component (DMNC) in...
  • entropy | Find the entropy centrality in a graph
  • epc | Find the edge percolated component (EPC) in a graph
  • geokpath | Find the geodesic k-path centrality
  • hubbell | Find the Hubbell centrality or the Hubbell Index
  • katzcent | Find the Katz centrality (Katz Status Index)
  • laplacian | Find the laplacian centrality
  • leaderrank | Find the LeaderRank in a directed graph
  • leverage | Find the leverage centrality
  • lincent | Find the lin centrality in a graph
  • lobby | Find the lobby index (centrality)
  • markovcent | Find the markov centrality score
  • mnc | Find the maximum neighborhood component (MNC)
  • pairwisedis | Find the pairwise disconnectivity index
  • radiality | Find the radiality centrality in a graph
  • salsa | Find the SALSA as 'hub' or 'authority' score
  • semilocal | Find the semi local centrality (or local centrality)
  • topocoefficient | Find the topological coefficient of a node in a undirected...

According to NetRankr

  • residual closeness (Dangalchev,2006)
  • generalized closeness (Agneessens et al.,2017)
  • decay centrality (Jackson, 2010)
  • integration centrality (Valente & Foreman, 1998)
  • subgraph centrality
  • communicability centrality
  • odd/even subgraph centrality
  • katz status

References

With callbacks from GiulioRossetti/cdlib#148 and igraph/igraph#1741

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.