Skip to content

Latest commit

 

History

History
104 lines (73 loc) · 2.73 KB

File metadata and controls

104 lines (73 loc) · 2.73 KB

SpectralEntropyLib

SpectralEntropyLib is an R library providing functions to compute spectral entropies and related information-theoretic quantities for complex networks.
It implements the theoretical framework introduced in:

M. De Domenico, J. Biamonte
Spectral entropies as information-theoretic tools for complex network comparison
Physical Review X, 6(4), 041062 (2016).
https://doi.org/10.1103/PhysRevX.6.041062


Introduction

Any physical system can be viewed as information implicitly represented in its state.
This library provides computational tools to quantify that information when the system is represented as a network, using techniques inspired by quantum statistical mechanics.

Main tools include:

  • Spectral entropies (von Neumann entropy, Rényi q-entropy)
  • Generalized divergences (Kullback–Leibler, Jensen–Shannon)
  • Information-theoretic distance measures between networks
  • Spectral gap profiles and thermodynamic quantities derived from spectra
  • Support for edge-colored and multilayer networks
  • Visualization utilities for entropy profiles and density matrices

Installation

Clone this repository and install locally with devtools:

devtools::install("path/to/SpectralEntropyLib")

Dependencies include:

  • igraph
  • Matrix
  • expm
  • RSpectra
  • ggplot2
  • RColorBrewer

Example

library(SpectralEntropyLib)
library(igraph)

# Example: simple ring graph with 10 nodes
g <- igraph::make_ring(10)

# von Neumann entropy at resolution beta = 0.5
S_vn <- getVNEntropy(g, beta = 0.5)

# Rényi entropy with q = 2
S_renyi <- getRenyiEntropy(g, beta = 0.5, q = 2)

# Jensen–Shannon distance between two networks
g1 <- igraph::make_ring(8)
g2 <- igraph::make_full_graph(8)
dist <- getNetworkDistance(g1, g2, beta = 0.5)

print(S_vn)
print(S_renyi)
print(dist)

References

If you use SpectralEntropyLib in your work, please cite:


Citation

@article{dedomenico2016spectral,
  title={Spectral entropies as information-theoretic tools for complex network comparison},
  author={De Domenico, Manlio and Biamonte, Jacob},
  journal={Physical Review X},
  volume={6},
  number={4},
  pages={041062},
  year={2016},
  publisher={American Physical Society}
}

License

This package is released under the MIT License.
See the LICENSE file for details.