TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

Module: tf.contrib.bayesflow.monte_carlo

View source on GitHub

Monte Carlo integration and helpers.

Use tfp.monte_carlo instead.


expectation(...): Computes the Monte-Carlo approximation of \(E_p[f(X)]\). (deprecated)

expectation_importance_sampler(...): Monte Carlo estimate of \(E_p[f(Z)] = E_q[f(Z) p(Z) / q(Z)]\).

expectation_importance_sampler_logspace(...): Importance sampling with a positive function, in log-space.