• ed.complete_conditional
  • ed.inferences.complete_conditional

Defined in edward/inferences/conjugacy/conjugacy.py.

Returns the conditional distribution RandomVariable \(p(\text{rv}\mid \cdot)\).

This function tries to infer the conditional distribution of rv given cond_set, a set of other RandomVariables in the graph. It will only be able to do this if

  1. \(p(\text{rv}\mid \text{cond\_set})\) is in a tractable exponential family; and
  2. the truth of assumption 1 is not obscured in the TensorFlow graph.

In other words, this function will do its best to recognize conjugate relationships when they exist. But it may not always be able to do the necessary algebra.


  • rv: RandomVariable. The random variable whose conditional distribution we are interested in.
  • cond_set: iterable of RandomVariable, optional. The set of random variables we want to condition on. Default is all random variables in the graph. (It makes no difference if cond_set does or does not include rv.)


When calling complete_conditional() multiple times, one should usually pass an explicit cond_set. Otherwise complete_conditional() will try to condition on the RandomVariables returned by previous calls to itself. This may result in unpredictable behavior.