permute_matrix!

ReservoirComputing.permute_matrix!Function
permute_matrix!([rng], reservoir_matrix,
    permutation_matrix=nothing)

Right-multiply reservoir_matrix by a permutation matrix to permute its columns. The update overwrites the contents of reservoir_matrix.

If permutation_matrix is nothing, a random permutation is generated and converted to a permutation matrix.

Arguments

  • rng: Random number generator used when permutation_matrix === nothing. Default is typically Utils.default_rng() from WeightInitializers (if you provide a wrapper method without rng).
  • reservoir_matrix: The reservoir weight matrix to be permuted.
  • permutation_matrix: A square permutation matrix of matching size. If nothing, a random permutation is used.
source