reservoirpy.observables.spectral_radius#

reservoirpy.observables.spectral_radius(W, maxiter=None)[source]#

Compute the spectral radius of a matrix W.

Spectral radius is defined as the maximum absolute eigenvalue of W.

Parameters:
  • W (array-like (sparse or dense) of shape (N, N)) – Matrix from which the spectral radius will be computed.

  • 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 W.

Return type:

float

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.