wigner_init
ReservoirComputing.wigner_init — Function
wigner_init([rng], [T], dim.;
std=1.0, std_diag=0.5, return_symmetric)Create and return a dense random wigner initialized reservoir matrix. We follow as outlined in (Verzelli et al., 2022) and previously (Inubushi and Yoshimura, 2017) The off-diagonal elements will be scaled by std while the diagonal elements will be scaled by std_diag. if 2 std_diag == std, then std machtes the resulting spectral radius of the matrix.
Arguments
rng: Random number generator.T: Type of the elements in the reservoir matrix. Default isFloat32.dims: Dimension of the (symmetric) reservoir matrix. Either a single integer or a pair of integers. Pair of integers must match.
Keyword arguments
std: The desired scaling for the standard deviation of the off_diagonal elements. Defaults to 1.0.std_diag: The desired scaling for the standard deviation of the diagonal elements. Defaults to 0.5.return_symmetric: Iftrue, returns a LinearAlgebra.Symmetric type matrix. Defaults tofalse.Examples
Default kwargs:
julia> rr = wigner_init(MersenneTwister(123), 5, 5); julia> size(rr) == (5, 5) && eltype(rr) == Float32 && issymmetric(rr) trueReturning a Symmetric matrix:
julia> rr = wigner_init(MersenneTwister(123), 5, 5; return_symmetric=true); julia> rr isa Symmetric{Float32} && size(rr) == (5, 5) trueReturning with different standard deviation on diagonal and off diagonal:
julia> rr = wigner_init(MersenneTwister(123), 5, 5; std_diag=5, std=1e-3); julia> issymmetric(rr) && maximum(abs, diag(rr)) > maximum(abs, rr .- Diagonal(diag(rr))) true