Utilities
ReservoirComputing.collectstates — Function
collectstates(rc, data, ps, st)Run the sequence data once through the reservoir chain rc, advancing the model state over time, and collect feature vectors at every Collect layer. If more than one Collect is encountered in a step, their vectors are concatenated with vcat in order of appearance. If no Collect is seen in a step, the feature defaults to the final vector exiting the chain for that time step.
If your LinearReadout layer was created with include_collect=true (default behaviour), a collection point is placed immediately before the readout, so the collected features are the inputs to the readout.
Arguments
rc: AReservoirChain(or compatibleAbstractLuxLayerwith.layers).data: Input sequence of shape(in_dims, T), where columns are time steps.ps,st: Current parameters and state forrc.
Returns
states: Reservoir states, i.e. a feature matrix with one column per time step. The feature dimensionn_featuresequals the vertical concatenation of all vectors captured atCollectlayers in that step.st: Updated model states.