low_connectivity
ReservoirComputing.low_connectivity — Function
low_connectivity([rng], [T], dims...;
connected=false, in_degree = 1, radius = 1.0,
cut_cycle = false, radius=nothing, return_sparse = false)Construct an internal reservoir connectivity matrix with low connectivity.
This function creates a reservoir matrix with the specified in-degree for each node (Griffith et al., 2019). When in_degree is 1, the function can enforce a fully connected cycle if connected is true; otherwise, it generates a random connectivity pattern.
Arguments
rng: Random number generator. Default isUtils.default_rng()from WeightInitializers.T: Type of the elements in the reservoir matrix. Default isFloat32.dims: Dimensions of the reservoir matrix.
Keyword Arguments
connected: Forin_degree == 1, iftruea connected cycle is enforced. Default isfalse.in_degree: The number of incoming connections per node. Must not exceed the number of nodes. Default is 1.radius: The desired spectral radius of the reservoir. Defaults to 1.0.cut_cycle: Iftrue, removes one edge from the cycle to cut it. Default isfalse.radius: The desired spectral radius of the reservoir. Ifnothingis passed, no scaling takes place. Defaults tonothing.return_sparse: flag for returning asparsematrix.truerequiresSparseArraysto be loaded. Default isfalse.
Examples
julia> low_connectivity(10, 10)
10×10 Matrix{Float32}:
0.0 0.0 0.0 … 0.0 0.0 0.2207
0.0 0.0 0.0 0.0 0.0 0.564821
0.318999 0.0 0.0 0.0 0.0 0.0
0.670023 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.79705 0.0 0.0
0.0 -1.95711 0.0 … 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 -0.650657 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 -1.0References
- Griffith, A.; Pomerance, A. and Gauthier, D. J. (2019). Forecasting chaotic systems with very low connectivity reservoir computers. Chaos: An Interdisciplinary Journal of Nonlinear Science 29.