Skip to content

Build · Topology (graph)

ring_chord

Generates a small-world digraph with a ring and backward chords. - ring edges i -> (i+1) mod n with weight 1.0 - backward chords i -> (i - L_k) mod n with weight w * alpha**k

ring_chord

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

reservoir = ESNLayer(500, feedback_size=3, recurrent_initializer='ring_chord', spectral_radius=None, seed=7)
parameter default
L 1
w 0.5
alpha 1.0

Override parameters with recurrent_initializer=("ring_chord", {...}) or pre-configure with get_recurrent_initializer("ring_chord", ...). The existing topology= spelling and get_topology() also work.

This builder preserves its native spectrum/scale by default. Use its parameters to control that scale, or explicitly configure get_recurrent_initializer(..., rescale=True) to allow an outer radius rescale.

See also