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 of matrix is zero or not finite, or so small that radius divided by it overflows, since the matrix cannot be rescaled to radius. Nilpotent matrices, such as the ones built by delay_line and forward_connection, have spectral radius 0. Also thrown if the scaled entries overflow the element type of matrix, in which case matrix has already been overwritten.
source