Public methods
Method new()
Initialisation method
Usage
DataSet.Seq$new(X, ls, yi, indexes = NULL)
Arguments
X
matrix/array
ls
integer, sequence length
yi
integer vector, subset of indices to return a targets
indexes
integer vector, a subset of indexes
indicating the starting point fir the sequences
Method length()
Returns the length of the dataset
Usage
DataSet.Seq$length()
Examples
ds = DataSet.Seq$new(matrix(rnorm(100), 20), 5, 1)
ds$length() # 20
Method feed()
Feeds the data into an existing seqience or creating a new one
Usage
DataSet.Seq$feed(x, mode = "head")
Arguments
x
existing sequence, if NULL it creates a new one
mode
chectacter indicating the way to build the sequences
Examples
modello.init(100, 100, 100, 100)
ds = DataSet.Seq$new(matrix(rnorm(100), 20), 5, 1)
SEQ = ds$feed(NULL)
print(names(SEQ))
print(SEQ$x[[1]]$v)
print(SEQ$y$v)
ds$feed(SEQ)
print(SEQ$x[[1]]$v)
print(SEQ$y$v)
modello.close()
Method rewind()
Sets the data loader back of n previous states.
Only available for "head" and "tail" modes.
Usage
DataSet.Seq$rewind(n, mode = "head")
Arguments
n
number of step to rewind
mode
rewind mode. Possibly the same as the feed mode.
Examples
ds = DataSet.Seq$new(matrix(rnorm(100), 20), 5, 1)
ds$..get.data..("head")
ds$..get.data..("head")
ds$rewind(2)
ds$..get.data..("head")
ds$..get.data..("head")
Method ..pop.index..()
Auxiliary method not to be called directly.
It pops an index from the dataset according to the given method
Usage
DataSet.Seq$..pop.index..(mode = "head")
Arguments
mode
popping mode
Method ..feed..()
Auxiliary method. Not to be called directly.
Usage
DataSet.Seq$..feed..(x, mode)
Arguments
x
existing sequence, if NULL it creates a new one
mode
chectacter indicating the way to build the sequences
Method ..get.data..()
Auxiliary method. Not to be called directly.
Usage
DataSet.Seq$..get.data..(mode)
Arguments
mode
chectacter indicating the way to build the sequences
Method clone()
The objects of this class are cloneable with this method.
Usage
DataSet.Seq$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.