predict_seq: Run the node-forward function on a sequence of data

View source: R/reservoir.R

predict_seqR Documentation

Run the node-forward function on a sequence of data

Description

Run the node-forward function on a sequence of data

Usage

predict_seq(node, X, formState = NULL, stateful = TRUE, reset = FALSE)

Arguments

node

node

X

array-like of shape ([n_inputs], timesteps, input_dim) A sequence of data of shape (timesteps, features).

formState

array of shape (1, output_dim), optional Node state value to use at begining of computation.

stateful

bool, default to TRUE If True, Node state will be updated by this operation.

reset

bool, default to FALSE If True, Node state will be reset to zero before this operation.

Details

Can update the state of the node several times

Value

An object of class reservoir_predict_seq. This object is a numeric vector containing the matrix of the prediction of the reservoir. It is either the forecast of the ridge layer or the node state of the reservoir if no ridge layer is given.

Examples

if(reticulate::py_module_available("reservoirpy")){
reservoir <- reservoirnet::createNode(nodeType = "Reservoir",
                                      seed = 1,
                                      units = 100,
                                      lr = 0.7,
                                      sr = 1,
                                      input_scaling = 1)
X <- matrix(data = rnorm(100), ncol = 4)
reservoir_state_stand <- reservoirnet::predict_seq(node = reservoir, X = X)
plot(reservoir_state_stand)
summary(reservoir_state_stand)
}



reservoirnet documentation built on April 4, 2023, 5:12 p.m.