nocad.measures.percent_loop_sym#

nocad.measures.percent_loop_sym(adj)[source]#

Percentage of nodes with a self-loop and of edges whose reverse edge also exists.

Returns:
percent_loopfloat

\(100\cdot\#\{i:a_{ii}\neq0\}/N\).

percent_symfloat

\(100\cdot\) (edges \(x_i\to x_j\), \(i\neq j\), with \(x_j\to x_i\) present) / (edges without self-loops), the definition of the NOCAD manual.

Examples

>>> percent_loop_sym([[1, 1], [1, 0]])
(50.0, 100.0)
>>> percent_loop_sym([[0, 1, 1], [1, 0, 0], [0, 0, 0]])
(0.0, 66.66666666666667)

Examples using nocad.measures.percent_loop_sym#

Networks with and without system dynamics

Networks with and without system dynamics

State matrices of real dynamical systems

State matrices of real dynamical systems