Type Deterministic
Namespace tensorflow.contrib.distributions
Parent _BaseDeterministic
Interfaces IDeterministic
Scalar `Deterministic` distribution on the real line. The scalar `Deterministic` distribution is parameterized by a [batch] point
`loc` on the real line. The distribution is supported at this point only,
and corresponds to a random variable that is constant, equal to `loc`. See [Degenerate rv](https://en.wikipedia.org/wiki/Degenerate_distribution). #### Mathematical Details The probability mass function (pmf) and cumulative distribution function (cdf)
are ```none
pmf(x; loc) = 1, if x == loc, else 0
cdf(x; loc) = 1, if x >= loc, else 0
``` #### Examples
Show Example
import tensorflow_probability as tfp
tfd = tfp.distributions # Initialize a single Deterministic supported at zero.
constant = tfd.Deterministic(0.)
constant.prob(0.)
==> 1.
constant.prob(2.)
==> 0. # Initialize a [2, 2] batch of scalar constants.
loc = [[0., 1.], [2., 3.]]
x = [[0., 1.1], [1.99, 3.]]
constant = tfd.Deterministic(loc)
constant.prob(x)
==> [[1., 0.], [0., 1.]]