link {reservoirnet}R Documentation

Link two :py:class:~.Node instances to form a :py:class:~.Model instance. node1 output will be used as input for node2 in the created model. This is similar to a function composition operation:

Description

Link two :py:class:~.Node instances to form a :py:class:~.Model instance. node1 output will be used as input for node2 in the created model. This is similar to a function composition operation:

Usage

link(node1, node2, name = NULL)

Arguments

node1

(Node) or (list_of_Node) Nodes or lists of nodes to link.

node2

(Node) or (list_of_Node) Nodes or lists of nodes to link.

name

(str) optional Name for the chaining Model.

Details

Can update the state of the node several times

Value

A reservoir model linking node1 and node2.

Examples

if(reticulate::py_module_available("reservoirpy")){
reservoir <- reservoirnet::createNode(nodeType = "Reservoir",
                                      seed = 1,
                                      units = 100,
                                      lr = 0.7,
                                      sr = 1,
                                      input_scaling = 1)
readout <- reservoirnet::createNode(nodeType = "Ridge", ridge = 0.1)
model <- reservoirnet::link(reservoir, readout)
}


[Package reservoirnet version 0.2.0 Index]