Learn R Programming

modello (version 0.1.1)

module.RecUnit: R6 class representing the recurrent layer of a Elmam or Jordan recurrent neural network

Description

R6 class representing the recurrent layer of a Elmam or Jordan recurrent neural network

R6 class representing the recurrent layer of a Elmam or Jordan recurrent neural network

Arguments

Super class

modello::module -> module.RecUnit

Methods

Public methods

Method new()

Initialisation method

Usage

module.RecUnit$new(tx, nh, nx, act)

Arguments

tx

transposition flag. If > 0 op(x) = t(x)

nh

number of input from the previous time steps

nx

number of input form the current time step

act

activation function

Method op()

Performs: act(Wx . op(x) + Wh . h + B)

Usage

module.RecUnit$op(h, x)

Arguments

h

number input from previous time steps

x

number input from the current timestep

Method pars()

Returns the parameters of the module as list with entries: W0 = weight matrix for past inputs, W = weight matrix for current input, and B = bias matrix

Usage

module.RecUnit$pars()

Returns

Returns a flat list with the parametrs of the module

Method clone()

The objects of this class are cloneable with this method.

Usage

module.RecUnit$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.