ed.get_control_variate_coef

Aliases:

  • ed.get_control_variate_coef
  • ed.util.get_control_variate_coef
get_control_variate_coef(
    f,
    h
)

Defined in edward/util/tensorflow.py.

Returns scalar used by control variates method for variance reduction in Monte Carlo methods.

If we have a statistic \(m\) as an unbiased estimator of \(\mu\) and and another statistic \(t\) which is an unbiased estimator of \(\tau\) then \(m^* = m + c(t - \tau)\) is also an unbiased estimator of \(\mu\) for any coefficient \(c\).

This function calculates the optimal coefficient

\(c^* = \frac{\text{Cov}(m,t)}{\text{Var}(t)}\)

for minimizing the variance of \(m^*\).

Args:

  • f: tf.Tensor. A 1-D tensor.
  • h: tf.Tensor. A 1-D tensor.

Returns:

tf.Tensor. A 0 rank tensor