A Python package for generating, learning, and analysis of complex networks.
Project description
ComplexNetwork
complex-network-tools is a Python package for generating, learning, and analysis of complex networks.
Examples
Synthetic network generating
from complex-network-tools.generator import erdos_renyi_graph
# generate a Erdos Renyi(ER) random graph
G = erdos_renyi_graph(num_nodes=100, num_edges=400, is_directed=False, is_weighted=False)
# generate a Barabasi Albert(BA) scale-free graph
G = barabasi_albert_graph(num_nodes=100, num_edges=400, is_directed=False, is_weighted=False)
Network attack
from complex-network-tools.robustness.network_attack import network_attack
# get attack sequence of nodes
G = erdos_renyi_graph(num_nodes=100, num_edges=400, is_directed=False, is_weighted=False)
# node-removal based network attacks, use the targeted-degree based node-removal strategy
attack_sequence = network_attack(graph=G, attack='node', strategy='degree')
Spectral measure
from complex-network-tools.spectral_measure.robustness_spectral_measure import spectral_gap
# calculate spectral gap for a graph
G = erdos_renyi_graph(num_nodes=100, num_edges=400, is_directed=False, is_weighted=False)
spectral_gap(G)
Install
To be added.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for complex-network-tools-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69ce099051ecd43d6472e643a405143e2760593daddda20784812ad584c28390 |
|
MD5 | 100f09987bf24f450caf0d075a9a4a6e |
|
BLAKE2b-256 | 65967d82a85ea97b6e920bab7baf9e5b0d71879ac852c0175f498ac5b266c42d |