Skip to main content

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

complex-network-tools-0.1.0.tar.gz (27.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page