# Train ARF and corresponding circuit
arf <- adversarial_rf(iris)
psi <- forde(arf, iris)
# What is the expected value Sepal.Length?
expct(psi, query = "Sepal.Length")
# What if we condition on Species = "setosa"?
evi <- data.frame(Species = "setosa")
expct(psi, query = "Sepal.Length", evidence = evi)
# Compute expectations for all features other than Species
expct(psi, evidence = evi)
Run the code above in your browser using DataLab