Calls adversarial_rf
, forde
and lik
.
For repeated application, it is faster to save outputs of adversarial_rf
and forde
and pass them via ...
or directly use lik
.
Value
A vector of likelihoods, optionally on the log scale. A dataset of n_synth
synthetic samples or of nrow(x)
synthetic
samples if n_synth
is undefined.
References
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.
Examples
# Estimate log-likelihoods
ll <- darf(iris)
# Partial evidence query
ll <- darf(iris, query = iris[1, 1:3])
# Condition on Species = "setosa"
ll <- darf(iris, query = iris[1, 1:3], evidence = data.frame(Species = "setosa"))