Learn R Programming

reservoirnet (version 0.3.0)

link: 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)

Value

A reservoir model linking node1 and node2.

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

Examples

Run this code
if (FALSE) {
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)
}
}

Run the code above in your browser using DataLab