scale_radius!
ReservoirComputing.scale_radius! — Function
scale_radius!(matrix, radius)Scale the spectral radius of the given matrix to be equal to the given radius
Arguments
matrix: Matrix to be scaled.radius: desidered radius to scale the given matrix to
Throws
ArgumentError: if the spectral radius ofmatrixis zero or not finite, or so small thatradiusdivided by it overflows, since the matrix cannot be rescaled toradius. Nilpotent matrices, such as the ones built bydelay_lineandforward_connection, have spectral radius 0. Also thrown if the scaled entries overflow the element type ofmatrix, in which casematrixhas already been overwritten.