LSTM

scalation.modeling.forecasting.neuralforecasting.LSTM
See theLSTM companion object
class LSTM(x: MatrixD, y: MatrixD, fname: Array[String], n_mem: Int)

The LSTM class implements Long Short-Term Memeory (LSTM) via Back Propagation Through Time (BPTT). At each time point x_t, there is a vector representing several variables or the encoding of a word. Intended to work for guessing the next work in a sentence or for multi-horizon forecasting. Time series: (x_t: t = 0, 1, ..., n_seq-1) where n_seq is the number of time points/words

Value parameters

fname

the feature/variable names

n_mem

the size for hidden state (h) (dimensionality of memory)

x

the input sequence/time series

y

the output sequence/time series

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def backward(): Unit

Backward propagate to calculate gradients using chain rules in O(n_seq) time. FIX - add option of using sse loss function and fix affected partial derivatives

Backward propagate to calculate gradients using chain rules in O(n_seq) time. FIX - add option of using sse loss function and fix affected partial derivatives

Attributes

def forward(): Unit

Forward propagate calculates yp, loss and intermediate variables for each step.

Forward propagate calculates yp, loss and intermediate variables for each step.

Attributes

def test(): Unit

Test the RNN predictions.

Test the RNN predictions.

Attributes

def train(): Unit

Train the LSTM using simple gradient descent.

Train the LSTM using simple gradient descent.

Attributes

def update_params(): Unit

Based on the calculated partial derivatives, update the parameters (weights and biases).

Based on the calculated partial derivatives, update the parameters (weights and biases).

Attributes