low_connectivity

ReservoirComputing.low_connectivityFunction
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 is Utils.default_rng()from WeightInitializers.
  • T: Type of the elements in the reservoir matrix. Default is Float32.
  • dims: Dimensions of the reservoir matrix.

Keyword Arguments

  • connected: For in_degree == 1, if true a connected cycle is enforced. Default is false.
  • 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: If true, removes one edge from the cycle to cut it. Default is false.
  • radius: The desired spectral radius of the reservoir. If nothing is passed, no scaling takes place. Defaults to nothing.
  • return_sparse: flag for returning a sparse matrix. true requires SparseArrays to be loaded. Default is false.

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.0
source

References