Learn R Programming

reservoirnet (version 0.3.0)

last_reservoir_state: Extract the Last Reservoir State for Each Input Sequence

Description

This function computes the reservoir states for a given set of input sequences and extracts the final state of the reservoir for each sequence.

Usage

last_reservoir_state(node, X)

Value

A list containing the last reservoir state for each input sequence. Each element of the returned list is a matrix representing the final state of the reservoir for a corresponding input sequence in `X`.

Arguments

node

A trained reservoir network model (from the `reservoirnet` package).

X

A list of input sequences, where each element is a matrix of input data.

Examples

Run this code
if (FALSE) {
library(reservoirnet)
node <- reservoirnet::createNode("Reservoir", units = 100,
                                 lr=0.1, sr=0.9,
                                 seed = 1)
X <- list(matrix(runif(100), ncol = 1), matrix(runif(200), ncol = 1))  # Example input sequences
last_states <- last_reservoir_state(node, X)
print(last_states)
}

Run the code above in your browser using DataLab