datasource.subsample
picks randomly the specified amount of
samples from the original datasource and also adds noise to the
subsampled dataset if it is specified.datasource.subsample(datasource,experiments=NA,datasets.num=5,
local.noise=20,global.noise=0,noiseType="normal",
samplevar=TRUE, seed = NULL)
NULL
) - see set.seed
.datasource.subsample
returns a list with
datasets.num
elements, each one of objects contains a data.frame of the
subsampled dataset with the amount of Gaussian noise
specified that would contain the same number of variables.experiments
is NA, the value
experiments
will be calculated automatically in order to
have datasets.num
smaller datasets that does not have the
same experiment twice inside each dataset.
Each of the subsampled datasets experiments
would have a
number of experiments around experiments
$\pm 20 %$
that would be chosen randomly among the original the original
number of experiments without replacement. If the argument experiments
is a number, the number of
datasets.num
is calculated automatically.
If the number of specified experiments
is greater or equal
than the original number of experiments, then only a replicate
will be generated and the subsampled dataset would have the same
dimensions as the original one but the experiments will be
unsorted randomly.
Two different types of noises could be added, that are specified
with the argument noiseType
:
netbenchmark
# Subsample
data.list.1 <- datasource.subsample(syntren300.data)
data.list.2 <- datasource.subsample(syntren300.data,
local.noise=10)
# Inference
inf.net.1 <- cor(data.list.1[[1]])
inf.net.2 <- cor(data.list.2[[4]])
Run the code above in your browser using DataLab