| synthesize | R Documentation |
synthesize() is a convenience wrapper around fit_synthesizer() and
generate(). Optionally the result is written to a file in any format
supported by write_data().
synthesize(
data,
n = NULL,
seed = NULL,
dependence = 1,
closeness = 1,
perturb = NULL,
file = NULL,
format = NULL,
...
)
data |
Training data (data frame, matrix, vector or |
n |
Number of synthetic records. Defaults to the size of |
seed |
Optional random seed (applies to fitting and generation). |
dependence |
Dependence strength in [0, 1]; see |
closeness, perturb |
Closeness to the real data and optional
perturbation; see |
file |
Optional output file path. The format is inferred from the
extension (see |
format |
Optional explicit file format, overriding the extension. |
... |
Arguments passed to |
The synthetic data (invisibly if file is given).
syn <- synthesize(iris, n = 200, seed = 1)
summary(syn)
out <- tempfile(fileext = ".csv")
synthesize(mtcars, file = out, seed = 1)
head(read_data(out))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.