Skip to content

Build · Topology (graph)

kleinberg_small_world

Generates a 2D Kleinberg small-world graph on an n x n toroidal grid.

kleinberg_small_world

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

reservoir = ESNLayer(500, feedback_size=3, topology="kleinberg_small_world", spectral_radius=0.9)
parameter default
q 2
k 1
directed False
weighted False
beta 2

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

See also