Skip to content

Build · Topology (graph)

random

Generate a random directed graph with a given density.

random

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

reservoir = ESNLayer(500, feedback_size=3, topology="random", spectral_radius=0.9)
parameter default
density

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

See also