Skip to main content

Analyzing Complex Networks with Python

Project description

netsci

Analyzing Complex Networks with Python

Author Version Demo
Gialdetti image Binder

netsci is a python package for efficient statistical analysis of spatially-embedded networks. In addition, it offers efficient implementations of motif counting algorithms. For other models and metrics, we highly recommend using existing and richer tools. Noteworthy packages are the magnificent NetworkX, graph-tool or Brain Connectivity Toolbox.

Simple example

Analyzing a star network (of four nodes)

>>> import numpy as np
>>> import netsci.visualization as nsv
>>> A = np.array([[0,1,1,1], [0,0,0,0], [0,0,0,0], [0,0,0,0]])
>>> nsv.plot_directed_network(A, pos=[[0,0],[-1,1],[1,1],[0,-np.sqrt(2)]])

Alt text

>>> import netsci.metrics.motifs as nsm
>>> f = nsm.motifs(A, algorithm='brute-force')
>>> print(f)
[1 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0]
>>> nsv.bar_motifs(f)

Alt text

Testing

After installation, you can launch the test suite:

$ pytest

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

netsci-0.0.1.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

netsci-0.0.1-py3-none-any.whl (26.9 kB view hashes)

Uploaded Python 3

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