| DataModel | R Documentation |
Class for storing data and various fixed quantity
Xmatrix of regressor
yvector of response
C_invInverse of the Cholesky decomposition of S
SSDP structuring matrix
wyvector of observation weights
dnumber of regressor
nsample size
sparse_encodinglogical indicating if the matrix of regressor is sparsely encoded
varnamescharacter, the names of the covariates/regressors
normxnorm of each column of X
DataModel$new()constructor for DataModel
DataModel$new( covariates, outcome, cov_struct, obs_weights = rep(1, length(outcome)), check_args = TRUE )
covariatesmatrix of covariates/regressors
outcomevector of outcome/response
cov_structsdp matrix structuring the covariates/regressors
obs_weightsvector of observations weights
check_argslogical, should args be check at initialization?
cov_weightsvector of covariates/regressors weights
DataModel$CholStruct()Compute Cholesky factorization of the Structuring matrix
DataModel$CholStruct()
DataModel$splitTrainTest()a function splitting the data into train and test folds
DataModel$splitTrainTest( nfolds = 10, folds = split(sample(1:self$n), rep(1:nfolds, length = self$n)) )
nfoldsthe number of folds
foldsa list of vectors describing the folds (optional)
a list with train and test data and id.
DataModel$splitFold()a function splitting the data into one train and one test set
DataModel$splitFold(omit)
omitvector of the indices of the test observations
a list with train and test data and id.
DataModel$splitSubSamples()a function splitting data into subsamples
DataModel$splitSubSamples(
n_subsamples = 50,
subsample_size = floor(self$n/2),
subsamples = replicate(n_subsamples, sample(1:self$n, subsample_size), simplify =
FALSE),
weakness = 1
)
n_subsamplesthe number of subsamples
subsample_sizethe subsample size
subsampleslist with vector of subsamples (optional)
weaknesscoefficient for randomly weighting the regressor, default to 1
a list of DataModel, resampling of the original
DataModel$clone()The objects of this class are cloneable with this method.
DataModel$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.