brainpy.nn.nodes.RC.NVAR#

class brainpy.nn.nodes.RC.NVAR(delay, order=None, stride=1, constant=False, trainable=False, **kwargs)[source]#

Nonlinear vector auto-regression (NVAR) node.

This class has the following features:

  • it supports batch size,

  • it supports multiple orders,

Parameters
  • delay (int) – The number of delay step.

  • order (int, sequence of int) – The nonlinear order.

  • stride (int) – The stride to sample linear part vector in the delays.

  • constant (optional, float) – The constant value.

References

1

Gauthier, D.J., Bollt, E., Griffith, A. et al. Next generation reservoir computing. Nat Commun 12, 5564 (2021). https://doi.org/10.1038/s41467-021-25801-2

__init__(delay, order=None, stride=1, constant=False, trainable=False, **kwargs)[source]#

Methods

__init__(delay[, order, stride, constant, ...])

copy([name, shallow])

Returns a copy of the Node.

feedback(ff_output, **shared_kwargs)

The feedback computation function of a node.

forward(ff[, fb])

The feedforward computation function of a node.

get_feature_names()

Get output feature names for transformation.

get_feature_names_for_plot()

Get output feature names for matplotlib plotting.

init_fb_conn()

Initialize the feedback connections.

init_fb_output([num_batch])

Set the initial node feedback state.

init_ff_conn()

Initialize feedforward connections.

init_state([num_batch])

Initialize the node state which depends on batch size.

initialize([num_batch])

Initialize the node.

load_states(filename[, verbose])

Load the model states.

nodes([method, level, include_self])

Collect all children nodes.

offline_fit(targets, ffs[, fbs])

Offline training interface.

online_fit(target, ff[, fb])

Online training fitting interface.

online_init()

Online training initialization interface.

register_implicit_nodes(nodes)

register_implicit_vars(variables)

save_states(filename[, variables])

Save the model states.

set_fb_output(state)

Safely set the feedback state of the node.

set_feedback_shapes(fb_shapes)

set_feedforward_shapes(feedforward_shapes)

set_output_shape(shape)

set_state(state)

Safely set the state of the node.

train_vars([method, level, include_self])

The shortcut for retrieving all trainable variables.

unique_name([name, type_])

Get the unique name for this object.

vars([method, level, include_self])

Collect all variables in this node and the children nodes.

Attributes

data_pass

Offline fitting method.

fb_output

rtype

Optional[TypeVar(Tensor, JaxArray, ndarray)]

feedback_shapes

Output data size.

feedforward_shapes

Input data size.

is_feedback_input_supported

is_feedback_supported

is_initialized

rtype

bool

name

output_shape

Output data size.

state

Node current internal state.

state_trainable

Returns if the Node can be trained.

train_state

trainable

Returns if the Node can be trained.