Public methods
Method new()
Initialisation method
Usage
DataSet.Seq$new(X, ls, yi, indexes = NULL)
Arguments
Xmatrix/array
lsinteger, sequence length
yiinteger vector, subset of indices to return a targets
indexesinteger 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
xexisting sequence, if NULL it creates a new one
modechectacter 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
nnumber of step to rewind
moderewind 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
modepopping mode
Method ..feed..()
Auxiliary method. Not to be called directly.
Usage
DataSet.Seq$..feed..(x, mode)
Arguments
xexisting sequence, if NULL it creates a new one
modechectacter indicating the way to build the sequences
Method ..get.data..()
Auxiliary method. Not to be called directly.
Usage
DataSet.Seq$..get.data..(mode)
Arguments
modechectacter 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
deepWhether to make a deep clone.