View source: R/shortcut_functions.R
rarf | R Documentation |
Calls adversarial_rf
, forde
and forge
.
For repeated application, it is faster to save outputs of adversarial_rf
and forde
and pass them via ...
or directly use forge
.
rarf(x, n_synth = NULL, ...)
x |
Input data. Integer variables are recoded as ordered factors with a warning. See Details. |
n_synth |
Number of synthetic samples to generate for unconditional
generation with no |
... |
Extra parameters to be passed to |
A dataset of n_synth
synthetic samples or of nrow(x)
synthetic
samples if n_synth
is undefined.
Watson, D., Blesch, K., Kapar, J., & Wright, M. (2023). Adversarial random forests for density estimation and generative modeling. In Proceedings of the 26th International Conference on Artificial Intelligence and Statistics, pp. 5357-5375.
arf
, adversarial_rf
, forde
, forge
# Generate 150 (size of original iris dataset) synthetic samples from the iris dataset
x_synth <- rarf(iris)
# Generate 100 synthetic samples from the iris dataset
x_synth <- rarf(iris, n_synth = 100)
# Condition on Species = "setosa"
x_synth <- rarf(iris, evidence = data.frame(Species = "setosa"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.