# Introduction¶

pyunicorn (Unified Complex Network and RecurreNce analysis toolbox) is a fully object-oriented Python package for the advanced analysis and modeling of complex networks. Above the standard measures of complex network theory such as degree, betweenness and clustering coefficient it provides some uncommon but interesting statistics like Newman’s random walk betweenness. pyunicorn features novel node-weighted (node splitting invariant) network statistics as well as measures designed for analyzing networks of interacting/interdependent networks.

Moreover, pyunicorn allows to easily construct networks from uni- and multivariate time series data (functional (climate) networks and recurrence networks). This involves linear and nonlinear measures of time series analysis for constructing functional networks from multivariate data as well as modern techniques of nonlinear analysis of single time series like recurrence quantification analysis (RQA) and recurrence network analysis.

For example, to generate a recurrence network with 1000 nodes from a sinusoidal signal and compute its network transitivity you simply need to type

import numpy as np
from pyunicorn.timeseries import RecurrenceNetwork

x = np.sin(np.linspace(0, 10 * np.pi, 1000))
net = RecurrenceNetwork(x, recurrence_rate=0.05)
print net.transitivity()


The package provides special tools to analyze and model spatially embedded complex networks.

pyunicorn is fast because all costly computations are performed in compiled C, C++ and Fortran code. It can handle large networks through the use of sparse data structures. The package can be used interactively, from any python script and even for parallel computations on large cluster architectures.