Creates a high dimensional subset from a HDDataset
object. Only the required instances are loaded in memory to avoid unnecessary
use of resources and memory.
new()
Method for initializing the object arguments during runtime.
HDSubset$new(
file.path,
feature.names,
feature.id,
start.at = 0,
sep = ",",
chunk.size
)
file.path
The name of the file which the data are to be read from.
Each row of the table appears as one line of the file. If it does not
contain an _absolute_ path, the file name is _relative_ to the current
working directory, 'getwd()
'.
feature.names
A character vector specifying the name of the
features that should be included in the HDDataset
object.
feature.id
An integer or character indicating the column (number or name respectively) identifier. Default NULL value is valid ignores defining a identification column.
start.at
A numeric value to identify the reading start position.
sep
the field separator character. Values on each line of the file are separated by this character.
chunk.size
an integer value indicating the size of chunks taken over each iteration. By default chunk.size is defined as 10000.
getColumnNames()
Gets the name of the columns comprising the subset.
HDSubset$getColumnNames()
A character vector containing the name of each column.
getNcol()
Obtains the number of columns present in the dataset.
HDSubset$getNcol()
A numeric value or 0 if is empty.
getID()
Obtains the column identifier.
HDSubset$getID()
A character vector of size 1.
getIterator()
Creates the FIterator
object.
HDSubset$getIterator(chunk.size = private$chunk.size, verbose = FALSE)
chunk.size
An integer value indicating the size of chunks
taken over each iteration. By default chunk.size
is defined as
10000.
verbose
A logical value to specify if more verbosity is needed.
A FIterator
object to transverse through
HDSubset
instances
isBlinded()
Checks if the subset contains a target class.
HDSubset$isBlinded()
A logical to specify if the subset contains a target class or not.
clone()
The objects of this class are cloneable with this method.
HDSubset$clone(deep = FALSE)
deep
Whether to make a deep clone.
Use HDDataset
to ensure the creation of a valid
HDSubset
object.
HDDataset
, DatasetLoader