Data {fuseMLR} | R Documentation |
Abstract class Data
Description
As abstract, a Data object cannot be stored on any layer. Instead, extended TrainData or TestData objects can be stored on a layer.
Methods
Public methods
Method new()
Constructor of class Data.
Usage
Data$new(id, ind_col, data_frame)
Arguments
id
character
Object ID.ind_col
character
Column name containing individual IDs.data_frame
data.frame
data.frame
containing data.
Method print()
Printer
Usage
Data$print(...)
Arguments
...
any
Method getIndSubset()
Retrieve a data subset for a given variable name and values, a data subset.
Usage
Data$getIndSubset(var_name, value)
Arguments
var_name
character
Variable name of interest.value
vector
Values of interest.
Returns
The data subset is returned.
Method impute()
Imputes missing values in modality-specific predictions. Only mode and median based imputations are actually supported.
Usage
Data$impute(impute_fct, impute_param, target_name)
Arguments
impute_fct
character
An imputation function to use instead of median or mode imputation. Not yet implemented!impute_param
list
target_name
character
Name of the target variable. The list of parameters to call the imputation function.
Returns
A new object with the predicted values is returned.
Method getVarSubset()
Retrieve a subset of variables from data.
Usage
Data$getVarSubset(var_name)
Arguments
var_name
character
Variable names of interest.
Returns
The data subset is returned.
Method getSetDiff()
For the given variable name, non existing values in the current dataset are returned.
Usage
Data$getSetDiff(var_name, value)
Arguments
var_name
character
Variable name of interest.value
vector
Values of interest.
Returns
The subset difference is returned.
Method getDataFrame()
Getter of the data.frame
.
Usage
Data$getDataFrame()
Returns
The data.frame
of the current object is returned.
Method setDataFrame()
Set a new data.frame
to the current object.
Usage
Data$setDataFrame(data_frame)
Arguments
data_frame
data.frame
Returns
The current object is returned.
Method getCompleteData()
Getter of the complete dataset without missing values.
Usage
Data$getCompleteData()
Returns
The complete dataset is returned.
Method getId()
Getter of the current object ID.
Usage
Data$getId()
Returns
The current object ID is returned.
Method getData()
Getter of the current Data. This function is re-implemented by TrainData and TestData.
Usage
Data$getData()
Returns
Do not use on this class.
Method getIndCol()
Getter of the individual column variable.
Usage
Data$getIndCol()
Method clone()
The objects of this class are cloneable with this method.
Usage
Data$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.