truedoublecycle
ReservoirComputing.true_double_cycle — Functiontrue_double_cycle([rng], [T], dims...;
cycle_weight=0.1, second_cycle_weight=0.1,
return_sparse=false)Creates a true double cycle reservoir, ispired by (Fu et al., 2023), with cycles built on the definition by (Rodan and Tino, 2011).
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
cycle_weight: Weight of the upper cycle connections in the reservoir matrix. Default is 0.1.second_cycle_weight: Weight of the lower cycle connections in the reservoir matrix. Default is 0.1.return_sparse: flag for returning asparsematrix. Default isfalse.cycle_kwargs, andsecond_cycle_kwargs: named tuples that control the kwargs for the weights generation. The kwargs are as follows:sampling_type: Sampling that decides the distribution ofweightnegative numbers. If set to:no_samplethe sign is unchanged. If set to:bernoulli_sample!then eachweightcan be positive with a probability set bypositive_prob. If set to:irrational_sample!theweightis negative if the decimal number of the irrational number chosen is odd. If set to:regular_sample!, each weight will be assigned a negative sign after the chosenstrides.stridescan be a single number or an array. Default is:no_sample.positive_prob: probability of theweightbeing positive whensampling_typeis set to:bernoulli_sample!. Default is 0.5.irrational: Irrational number whose decimals decide the sign ofweight. Default ispi.start: Which place after the decimal point the counting starts for theirrationalsign counting. Default is 1.strides: number of strides for assigning negative value to a weight. It can be an integer or an array. Default is 2.
Examples
julia> true_double_cycle(5, 5; cycle_weight = 0.1, second_cycle_weight = 0.3)
5×5 Matrix{Float32}:
0.0 0.3 0.0 0.0 0.1
0.1 0.0 0.3 0.0 0.0
0.0 0.1 0.0 0.3 0.0
0.0 0.0 0.1 0.0 0.3
0.3 0.0 0.0 0.1 0.0References
- Fu, J.; Li, G.; Tang, J.; Xia, L.; Wang, L. and Duan, S. (2023). A double-cycle echo state network topology for time series prediction. Chaos: An Interdisciplinary Journal of Nonlinear Science 33.
- Rodan, A. and Tino, P. (2011). Minimum Complexity Echo State Network. IEEE Transactions on Neural Networks 22, 131–144.