| synthesize | R Documentation |
Synthesize a data set
synthesize(
presynth,
progress = FALSE,
keep_workflows = FALSE,
keep_partial = FALSE
)
presynth |
A |
progress |
Logical, if TRUE, displays progress. Default is |
keep_workflows |
Logical, if TRUE, returns derived roadmap components
in |
keep_partial |
Logical, if TRUE, saves partial synthesis to output.
Default is |
A postsynth object.
# create roadmap
rm <- roadmap(
conf_data = acs_conf_nw,
start_data = acs_start_nw
)
rpart_mod_reg <- parsnip::decision_tree() |>
parsnip::set_engine(engine = "rpart") |>
parsnip::set_mode(mode = "regression")
rpart_mod_class <- parsnip::decision_tree() |>
parsnip::set_engine(engine = "rpart") |>
parsnip::set_mode(mode = "classification")
synth_spec1 <- synth_spec(
default_regression_model = rpart_mod_reg,
default_regression_sampler = sample_rpart,
default_classification_model = rpart_mod_class,
default_classification_sampler = sample_rpart
)
# create a presynth object
# use defaults for noise, constraints, and replicates
presynth1 <- presynth(
roadmap = rm,
synth_spec = synth_spec1
)
# synthesize!
set.seed(1)
postsynth1 <- synthesize(presynth = presynth1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.