makefastcmhdata {fastcmh} | R Documentation |
Create sample data for fastcmh
Description
This function creates sample data for use with the runfastcmh
method.
Usage
makefastcmhdata(folder = "./", xfilename = "data.txt",
yfilename = "label.txt", covfilename = "cov.txt", K = 2, L = 1000,
n = 200, noiseP = 0.3, corruptP = 0.05, rho = 0.8, tau1 = 100,
taulength1 = 4, tau2 = 200, taulength2 = 4, seednum = 2,
truetaufilename = "truetau.txt", showOutput = FALSE, saveToList = FALSE)
Arguments
folder |
The folder in which the data will be saved. Default is
current directory |
xfilename |
The name of the data file. Default is |
yfilename |
The name of the label file. Default is |
covfilename |
The name of the file containing the covariate categories
. This file actually just contains |
K |
The number of covariates (a positive integer). Default is
|
L |
The number of features (length of each sequence). Default is
|
n |
The number of samples (cases and controls combined). Default is
|
noiseP |
The background noise in the data (as a probability of 0/1
being flipped). Default is |
corruptP |
The probability of data corruption: each bit has
probability |
rho |
The strength of the confounding in the confounded interval (as
a probability). Default is |
tau1 |
The location of the significant interval (starting point).
Default value is |
taulength1 |
The length of the significant interval. Default value is
|
tau2 |
The location of the confounded significant interval (starting
point). Default value is |
taulength2 |
The length of the confounded significant interval.
Default value is |
seednum |
The seed used for generating the data. Default value is
|
truetaufilename |
The file where the location of the true significant
intervals are saved (as opposed to the detected significant intervals).
Default is |
showOutput |
Flag to decide whether or not to show output, where files
are created, their names, etc. Default is |
saveToList |
Flag to decide whether or not to save data to the folder,
or to return (output) the data as a list. By default,
|
See Also
Examples
#make a small sample data set, using the default parameters
mylist <- makefastcmhdata(showOutput=TRUE, saveToList=TRUE)
#make a very small sample data set
mylist <- makefastcmhdata(n=20, L=10, tau1=2, taulength1=2,
tau2=6, taulength2=2, saveToList=TRUE)