Skip to content

Build · Topology (graph)

erdos_renyi

Generates an Erdos-Renyi (G(n, p)) graph.

erdos_renyi

Connectivity and weight matrix on a small reservoir.
from resdag.layers import ESNLayer

reservoir = ESNLayer(500, feedback_size=3, topology="erdos_renyi", spectral_radius=0.9)
parameter default
p
directed True
self_loops True

Override any parameter with the tuple spec — topology=("erdos_renyi", {...}) — or pre-configure with get_topology("erdos_renyi", ...). Scaling to a target spectral radius happens after construction, whatever the source.

See also