Description Usage Arguments Details Objects from the Class Methods Author(s) See Also Examples
A MixedTypeEngine combines a ClinicalEngine (which defines the combinatorics
of hits and block hyperparameters that determine cluster identities and behavior),
a stored ClinicalNoiseModel
, and cutpoints for generating mixed type
data generated by makeDataTypes
into an object that can be used to
re-generate downstream datasets with shared parameters.
1 2 3 4 5 |
ce |
Object of class |
noise |
Object of class |
cutpoints |
a list with the properties of the |
object |
object of class |
n |
a non-negative integer |
keepall |
a logical value |
... |
additional arguments for generic functions. |
The MixedTypeEngine is a device for a parameter set used to generate a simulated set of clinical data which can be used to store these parameters and to generate related datasets downstream. Building a MixedTypeEngine requires many parameters. You can supply these parameters in mutliple steps:
Construct a ClinicalEngine
.
Contruct a ClinicalNoiseModel
.
Use rand
rand to generate a "raw" data set from the
ClinicalEngine
.
Use blur
to add noise to the raw data.
Feed the noisy data into makeDataTypes
to generate a
mixed-type dataset, with cut points.
Pass the ClinicalEngine
, ClinicalNoiseModel
, and
cutpoints into the MixedTypeEngine
constructor.
The alternative method is to pass the parameters for Steps 1, 2, and 5
directly into the MixedTypeEngine
directly, as lists, and it will
carry out steps 3-5 automatically. Note, however, that instead of
passing a dataset
to be used by the makeDataTypes
function,
you instead set the value of N
to the desired number of patients
used during construction. Also, if you use the explicit steps, you
can save the intermediate data sets that are generated. If you simply
pass all of the parameters to the constructor, those intermediate data
sets are discarded, and you must generate a new data set using
rand
.
Objects can be created by a direct call to
new, though using the constructor
MixedTypeEngine
is preferred.
Generates nrow(Engine)*n matrix
representing clinical features of n
patients following the
underlying distribution, noise, and data discretization pattern
captured in the object of MixedTypeEngine
. If keepall
== TRUE
, it reurns a list containing a data frame named
clinical
and three data matrices called raw
,
noisy
, and binned
. If keepall == FALSE
, then
noly the clinical
and binned
components are returned.
Prints a summary of the object.
Kevin R. Coombes krc@silicovore.com, Caitlin E. Coombes caitlin.coombes@osumc.edu
Engine
CancerModel
CancerEngine
ClinicalNoiseModel
makeDataTypes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Generate a Clinical Engine of continuous data
## with clusters generated from variation on the base CancerEngine
ce <- ClinicalEngine(20, 4, TRUE)
summary(ce)
## Generate an initial data set
set.seed(194718)
dset <- rand(ce, 300)
class(dset)
names(dset)
summary(dset$clinical)
dim(dset$data)
## Add noise before binning mixed type data
cnm <- ClinicalNoiseModel(nrow(ce@localenv$eng)) # default
noisy <- blur(cnm, dset$data)
## Set the data mixture
dt <- makeDataTypes(dset$data, 1/3, 1/3, 1/3, 0.3)
## Store the cutpoints
cp <- dt$cutpoints
## Use the pieces from above to create an MTE.
mte <- MixedTypeEngine(ce,
noise = cnm,
cutpoints = dt$cutpoints)
## Use the MTE rand method to generate
## multiple data sets with the same parameters
R <- rand(mte, 20)
summary(R)
S <- rand(mte, 20)
summary(S)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.