# Resilience

We provide the metrics proposed by Gao et al (2016) which summarize the global behaviour of complex unipartite networks. The dynamics of a system of N components (nodes/species) can follow the coupled nonlinear differential equation

where the adjacency matrix $A$ captures the interaction between the components. This system can be described in 1-D using an effective term

with $\beta_\text{eff}$ a single resilience parameter which can capture the effect of perturbing the system (node/link removal, weight change...). This resilience parameter can be computed from an `AbstractUnipartiteNetwork`

using the functions `βeff`

or `resilience`

.

It can be shown that

with

- \[\langle s \rangle\]the average weighted degree (computed using
`s_mean`

), - \[\mathcal{S}\]the symmetry(computed using
`symmetry`

), - \[\mathcal{H}\]the heterogeneity (computed using
`heterogeneity`

).

Goa, J., Barzael, B. and Barabási 2016. Universal resilience patterns in complex networks. Nature 530(7590), 307-312. doi:10.1038/nature16948

## Available functions

`EcologicalNetworks.s`

— Function`s(N::AbstractUnipartiteNetwork; dims::Union{Nothing,Integer}=nothing)`

Computes the average weighted degree. This is proportional to the (weighted) density of interactions.

If dims is provided, the incoming (`dims=1`

) or outgoing (`dims=2`

) is computed.

`EcologicalNetworks.σ_in`

— Function`σ_in(N::AbstractUnipartiteNetwork)`

Computes the standard deviation of the ingoing weighted degree of an unipartite network.

`EcologicalNetworks.σ_out`

— Function`σ_out(N::AbstractUnipartiteNetwork)`

Computes the standard deviation of the outgoing weighted degree of an unipartite network.

`EcologicalNetworks.symmetry`

— Function`symmetry(N::AbstractUnipartiteNetwork)`

Computes the symmetry between s^in and s^out (the in- and outgoing weighted degree of an unipartite network). This is computed as the Pearson correlation between the s^in and s^out. It is hence a value between -1 and 1, where high positive values indicate that species with many outgoing degrees tend to have many ingoing degrees and negative values mean the opposite. An undirected network is perfectly symmetric but, for example, a food web where predators are less likely to be prey would have a negative symmetry.

Goa, J., Barzael, B. and Barabási 2016. Universal resilience patterns in complex networks. Nature 530(7590), 307-312. doi:10.1038/nature16948

`EcologicalNetworks.heterogeneity`

— Function`heterogeneity(N::AbstractUnipartiteNetwork)`

Computes the heterogeneity for an unipartite network, a topological characteristic which quantifies the difference in in- and outgoing degrees between species. It is computed as σ*in * σ*out / s_mean. A value of 0 indicates that all species have the same (weighted) in- and outdegrees.

Goa, J., Barzael, B. and Barabási 2016. Universal resilience patterns in complex networks. Nature 530(7590), 307-312. doi:10.1038/nature16948

`EcologicalNetworks.resilience`

— Function`resilience(N::AbstractUnipartiteNetwork)`

A resilience parameters described by Gao et al. (2016). It is a global parameters describing the dynamics of an unipartite network as an effective 1D equation of the form

f(xeff) = F(xeff) + βeff G(xeff, xeff)

i.e. describing a second-order term representing the effect of the network on the dynamics of the 'effective state' xeff of the system.