reservoirpy.observables.effective_spectral_radius#
- reservoirpy.observables.effective_spectral_radius( )[source]#
Effective spectral radius
The effective spectral radius is defined as the maximal singular value of the matrix \(lr \cdot W + (1-lr) \cdot I_{n}\).
This concept was first introduced by Jaeger & al. [1], with an important result on leaky echo state networks:
Supposing:
The activation function is tanh
There is no added noise inside the reservoir (noise_rc = noise_in = 0.0)
There is no feedback
There is no bias inside the reservoir (bias = 0)
Then, if the effective spectral radius exceeds 1, the ESN does not have the echo state property.
- Parameters:
W (array of shape (units, units)) – Adjacency matrix of a reservoir
lr (float) – Leak rate
maxiter (int, optional) – Maximum number of Arnoldi update iterations allowed. By default, is equal to W.shape[0] * 20. See Scipy documentation for more informations.
- Returns:
Spectral radius of \(lr \cdot W + (1-lr) \cdot I_{n}\).
- Return type:
- Raises:
ArpackNoConvergence – When computing spectral radius on large sparse matrices, it is possible that the Fortran ARPACK algorithm used to compute eigenvalues don’t converge towards precise values. To avoid this problem, set the maxiter parameter to an higher value. Be warned that this may drastically increase the computation time.
Examples
>>> from reservoirpy.observables import spectral_radius, effective_spectral_radius >>> from reservoirpy.mat_gen import uniform >>> W = uniform(100, 100, sr=0.5, seed=0) >>> lr = 0.5 >>> print(f"{spectral_radius(W)=:.3}") >>> print(f"{effective_spectral_radius(W, lr=lr)=:.3}") spectral_radius(W)=0.5 effective_spectral_radius(W, lr=lr)=0.701
References