Description Usage Arguments Value See Also Examples
Create a data simulation and return train/holdout/validation data sets.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | createSimulation(
num.samples = 100,
num.variables = 100,
pct.imbalance = 0.5,
pct.signals = 0.1,
bias = 0.4,
label = "class",
sim.type = "mainEffect",
pct.train = 0.5,
pct.holdout = 0.5,
pct.validation = 0,
save.file = NULL,
verbose = FALSE
)
|
num.samples |
An integer for the number of samples |
num.variables |
An integer for the number of variables |
pct.imbalance |
A numeric percentage to indicate proportion of the imbalaced samples. 0 means all controls and 1 mean all cases. |
pct.signals |
A numeric for proportion of simulated signal variables |
bias |
A numeric for effect size in simulated signal variables |
label |
A character vector for the name of the outcome column. class for classification and qtrait for regression |
sim.type |
A character vector of the type of simulation: mainEffect/interactionErdos/interactionScalefree |
pct.train |
A numeric percentage of samples to use for traning |
pct.holdout |
A numeric percentage of samples to use for holdout |
pct.validation |
A numeric percentage of samples to use for testing |
save.file |
A filename or NULL indicating whether to save the simulations to file |
verbose |
A flag indicating whether verbose output be sent to stdout |
A list with:
traing data set
holdout data set
validation data set
the class label/column name
the variable names with simulated signals
total elapsed time
Other simulation:
createInteractions()
,
createMainEffects()
,
createMixedSimulation()
,
splitDataset()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | num.variables <- 100
num.samples <- 100
pct.imbalance <- 0.5
pct.signals <- 0.1
bias <- 0.4
label <- "class"
sim.type <- "mainEffect"
sim.data <- createSimulation(num.samples=num.samples,
num.variables=num.variables,
pct.imbalance=pct.imbalance,
pct.signals=pct.signals,
bias=bias,
label=label,
sim.type=sim.type,
verbose=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.