logistic_mapping

ReservoirComputing.logistic_mappingFunction
logistic_mapping([rng], [T], dims...;
    amplitude=0.3, sine_divisor=5.9, logistic_parameter=3.7,
    return_sparse=false)

Generate an input weight matrix using a logistic mapping (Wang et al., 2022) The first row is initialized using a sine function:

\[ W[1, j] = \text{amplitude} \cdot \sin(j \cdot \pi / (\text{sine_divisor} \cdot in_size))\]

for each input index j, with in_size being the number of columns provided in dims. Subsequent rows are generated recursively using the logistic map recurrence:

\[ W[i+1, j] = \text{logistic_parameter} \cdot W(i, j) \cdot (1 - W[i, j])\]

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 matrix. Should follow res_size x in_size.

Keyword arguments

  • amplitude: Scaling parameter used in the sine initialization of the first row. Default is 0.3.
  • sine_divisor: Parameter used to adjust the phase in the sine initialization. Default is 5.9.
  • logistic_parameter: The parameter in the logistic mapping recurrence that governs the dynamics. Default is 3.7.
  • return_sparse: If true, returns the resulting matrix as a sparse matrix. Default is false.

Examples

julia> using ReservoirComputing: logistic_mapping

julia> input_matrix = logistic_mapping(8, 3);

julia> size(input_matrix) == (8, 3) && all(0 .<= input_matrix .<= 1)
true
source

References