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


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for netsci, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size netsci-0.0.1-py3-none-any.whl (26.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size netsci-0.0.1.tar.gz (11.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page