Calls adversarial_rf
, forde
and expct
.
For repeated application, it is faster to save outputs of adversarial_rf
and forde
and pass them via ...
or directly use expct
.
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
# What is the expected values of each feature?
earf(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.843333 3.057333 3.758 1.199333 virginica
#' # What is the expected values of Sepal.Length?
earf(iris, query = "Sepal.Length")
#> Sepal.Length
#> 1 5.843333
# What if we condition on Species = "setosa"?
earf(iris, query = "Sepal.Length", evidence = data.frame(Species = "setosa"))
#> Sepal.Length
#> 1 5.010467