ed.complete_conditional
优质
小牛编辑
129浏览
2023-12-01
Aliases:
ed.complete_conditional
ed.inferences.complete_conditional
complete_conditional(
rv,
cond_set=None
)
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 RandomVariable
s in the graph. It will only be able to do this if
- $(p(\text{rv}\mid \text{cond\_set}))$ is in a tractable exponential family; and
- 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.
Args:
rv
: RandomVariable. The random variable whose conditional distribution we are interested in.cond_set
: iterable of RandomVariable. The set of random variables we want to condition on. Default is all random variables in the graph. (It makes no difference ifcond_set
does or does not includerv
.)
Notes
When calling complete_conditional()
multiple times, one should usually pass an explicit cond_set
. Otherwise complete_conditional()
will try to condition on the RandomVariable
s returned by previous calls to itself. This may result in unpredictable behavior.