View source: R/synth_multimodal.R
synth_multimodal | R Documentation |
Create "Multimodal" Synthetic Data using squares and arctangents
synth_multimodal(
n.cases = 10000,
init.fn = "runifmat",
init.fn.params = list(min = -10, max = 10),
n.groups = 4,
n.feat.per.group = round(seq(10, 300, length.out = n.groups)),
contrib.p = 0.33,
linear.p = 0.66,
square.p = 0.1,
atan.p = 0.1,
pair.multiply.p = 0.05,
pair.square.p = 0.05,
pair.atan.p = 0.05,
verbose = TRUE,
seed = NULL,
filename = NULL
)
n.cases |
Integer: Number of cases to create. Default = 10000 |
init.fn |
Character: "runifmat" or "rnormmat". Use the respective functions to generate features as random uniform and random normal variables, respectively. Default = "runifmat" |
init.fn.params |
Named list with arguments "min", "max" for "runifmat" and
"mean", "sd" for "rnormmat". Default = |
n.groups |
Integer: Number of feature groups / modalities to create. Default = 4 |
n.feat.per.group |
Integer, vector, length |
contrib.p |
Float (0, 1]: Ratio of features contributing to outcome per group. Default = .33, i.e. a third of the features in each group will be used to produce the outcome y |
linear.p |
Float [0, 1]: Ratio of contributing features to be included linearly. Default = .1, i.e. .1 of .33 of features in each group will be included |
square.p |
Float [0, 1]: Ratio of contributing features to be squared. Default = .1, i.e. .1 of .33 of features in each group will be squared |
atan.p |
Float [0, 1]: Ratio of contributing features whose |
pair.multiply.p |
Float [0, 1] Ratio of features will be divided into pairs and multiplied. Default = .05 |
pair.square.p |
Float [0, 1] Ratio of features which will be divided into pairs, multiplied and squared. |
pair.atan.p |
Float [0, 1] Ratio of features which will be divided into pairs, multiplied and transformed using
|
verbose |
Logical: If TRUE, print messages to console. |
seed |
Integer: If set, pass to |
filename |
Character: Path to file to save output. |
There are no checks yet for compatibility among inputs and certain combinations may not work.
List with elements x, y, index.square, index.atan, index.pair.square
E.D. Gennatas
xmm <- synth_multimodal(
n.cases = 10000,
init.fn = "runifmat",
init.fn.params = list(min = -10, max = 10),
n.groups = 5,
n.feat.per.group = c(20, 50, 100, 200, 300),
contrib.p = .33,
linear.p = .66,
square.p = .1,
atan.p = .1,
pair.multiply.p = .1,
pair.square.p = .1,
pair.atan.p = .1,
seed = 2019
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.