__init__

The distributions have degree of freedom df, mean loc, and scale
scale.

The parameters df, loc, and scale must be shaped in a way that
supports broadcasting (e.g. df + loc + scale is a valid operation).

Args:

df: Floating-point Tensor. The degrees of freedom of the
distribution(s). df must contain only positive values.

loc: Floating-point Tensor. The mean(s) of the distribution(s).

scale: Floating-point Tensor. The scaling factor(s) for the
distribution(s). Note that scale is not technically the standard
deviation of this distribution but has semantics more similar to
standard deviation than variance.

allow_nan_stats: Python bool, default True. When True,
statistics (e.g., mean, mode, variance) use the value "NaN" to
indicate the result is undefined. When False, an exception is raised
if one or more of the statistic's batch members are undefined.

name: Python str name prefixed to Ops created by this class.

Raises:

TypeError: if loc and scale are different dtypes.

Properties

allow_nan_stats

Python bool describing behavior when a stat is undefined.

Stats return +/- infinity when it makes sense. E.g., the variance of a
Cauchy distribution is infinity. However, sometimes the statistic is
undefined, e.g., if a distribution's pdf does not achieve a maximum within
the support of the distribution, the mode is undefined. If the mean is
undefined, then by definition the variance is undefined. E.g. the mean for
Student's T for df = 1 is undefined (no clear way to say it is either + or -
infinity), so the variance = E[(X - mean)**2] is also undefined.

Returns:

allow_nan_stats: Python bool.

batch_shape

Shape of a single sample from a single event index as a TensorShape.

May be partially defined or unknown.

The batch dimensions are indexes into independent, non-identical
parameterizations of this distribution.

Returns:

batch_shape: TensorShape, possibly unknown.

df

Degrees of freedom in these Student's t distribution(s).

dtype

The DType of Tensors handled by this Distribution.

event_shape

Shape of a single sample from a single batch as a TensorShape.

May be partially defined or unknown.

Returns:

event_shape: TensorShape, possibly unknown.

loc

Locations of these Student's t distribution(s).

name

Name prepended to all ops created by this Distribution.

parameters

Dictionary of parameters used to instantiate this Distribution.

reparameterization_type

Describes how samples from the distribution are reparameterized.

Currently this is one of the static instances
distributions.FULLY_REPARAMETERIZED
or distributions.NOT_REPARAMETERIZED.

Returns:

An instance of ReparameterizationType.

scale

Scaling factors of these Student's t distribution(s).

validate_args

Python bool indicating possibly expensive checks are enabled.

Methods

batch_shape_tensor

batch_shape_tensor(name='batch_shape_tensor')

Shape of a single sample from a single event index as a 1-D Tensor.

The batch dimensions are indexes into independent, non-identical
parameterizations of this distribution.

Args:

name: name to give to the op

Returns:

batch_shape: Tensor.

cdf

cdf(
value,
name='cdf'
)

Cumulative distribution function.

Given random variable X, the cumulative distribution function cdf is:

cdf(x) := P[X <= x]

Args:

value: float or doubleTensor.

name: Python str prepended to names of ops created by this function.

Returns:

cdf: a Tensor of shape sample_shape(x) + self.batch_shape with
values of type self.dtype.

copy

copy(**override_parameters_kwargs)

Creates a deep copy of the distribution.

Note: the copy distribution may continue to depend on the original
initialization arguments.

Args:

**override_parameters_kwargs: String/value dictionary of initialization
arguments to override with new values.

Returns:

distribution: A new instance of type(self) initialized from the union
of self.parameters and override_parameters_kwargs, i.e.,
dict(self.parameters, **override_parameters_kwargs).

covariance

covariance(name='covariance')

Covariance.

Covariance is (possibly) defined only for non-scalar-event distributions.

For example, for a length-k, vector-valued distribution, it is calculated
as,

Returns:

cross_entropy

cross_entropy(
other,
name='cross_entropy'
)

Computes the (Shannon) cross entropy.

Denote this distribution (self) by P and the other distribution by
Q. Assuming P, Q are absolutely continuous with respect to
one another and permit densities p(x) dr(x) and q(x) dr(x), (Shanon)
cross entropy is defined as:

Returns:

mean

The mean of Student's T equals loc if df > 1, otherwise it is
NaN. If self.allow_nan_stats=True, then an exception will be raised
rather than returning NaN.

mode

mode(name='mode')

Mode.

param_shapes

param_shapes(
cls,
sample_shape,
name='DistributionParamShapes'
)

Shapes of parameters given the desired shape of a call to sample().

This is a class method that describes what key/value arguments are required
to instantiate the given Distribution so that a particular shape is
returned for that instance's call to sample().

Subclasses should override class method _param_shapes.

Args:

sample_shape: Tensor or python list/tuple. Desired shape of a call to
sample().

name: name to prepend ops with.

Returns:

dict of parameter name to Tensor shapes.

param_static_shapes

param_static_shapes(
cls,
sample_shape
)

param_shapes with static (i.e. TensorShape) shapes.

This is a class method that describes what key/value arguments are required
to instantiate the given Distribution so that a particular shape is
returned for that instance's call to sample(). Assumes that the sample's
shape is known statically.