CreateTrainData {ADImpute} | R Documentation |
CreateTrainingData
selects a subset of cells to use as
training set and sets a portion (mask
) of the non-zero entries in each
row of the subset to zero
CreateTrainData(data, train.ratio = .7, train.only = TRUE, mask = .1, write = FALSE)
data |
matrix; raw counts (genes as rows and samples as columns) |
train.ratio |
numeric; ratio of the samples to be used for training |
train.only |
logical; if TRUE define only a training dataset, if FALSE writes both training and validation sets (defaults to TRUE) |
mask |
numeric; ratio of total non-zero samples to be masked per gene (defaults to .1) |
write |
logical; should the output be written to a file? |
list with resulting matrix after subsetting and after masking