tfp.edward2.VectorLaplaceDiag(
*args,
**kwargs
)
Create a random variable for VectorLaplaceDiag.
See VectorLaplaceDiag for more details.
Returns:
RandomVariable.
Original Docstring for Distribution
Construct Vector Laplace distribution on R^k
.
The batch_shape
is the broadcast shape between loc
and scale
arguments.
The event_shape
is given by last dimension of the matrix implied by
scale
. The last dimension of loc
(if provided) must broadcast with this.
Recall that covariance = 2 * scale @ scale.T
.
scale = diag(scale_diag + scale_identity_multiplier * ones(k))
where:
scale_diag.shape = [k]
, and,scale_identity_multiplier.shape = []
.
Additional leading dimensions (if any) will index batches.
If both scale_diag
and scale_identity_multiplier
are None
, then
scale
is the Identity matrix.
Args:
loc
: Floating-pointTensor
. If this is set toNone
,loc
is implicitly0
. When specified, may have shape[B1, ..., Bb, k]
whereb >= 0
andk
is the event size.scale_diag
: Non-zero, floating-pointTensor
representing a diagonal matrix added toscale
. May have shape[B1, ..., Bb, k]
,b >= 0
, and characterizesb
-batches ofk x k
diagonal matrices added toscale
. When bothscale_identity_multiplier
andscale_diag
areNone
thenscale
is theIdentity
.scale_identity_multiplier
: Non-zero, floating-pointTensor
representing a scaled-identity-matrix added toscale
. May have shape[B1, ..., Bb]
,b >= 0
, and characterizesb
-batches of scaledk x k
identity matrices added toscale
. When bothscale_identity_multiplier
andscale_diag
areNone
thenscale
is theIdentity
.validate_args
: Pythonbool
, defaultFalse
. WhenTrue
distribution parameters are checked for validity despite possibly degrading runtime performance. WhenFalse
invalid inputs may silently render incorrect outputs.allow_nan_stats
: Pythonbool
, defaultTrue
. WhenTrue
, statistics (e.g., mean, mode, variance) use the value "NaN
" to indicate the result is undefined. WhenFalse
, an exception is raised if one or more of the statistic's batch members are undefined.name
: Pythonstr
name prefixed to Ops created by this class.
Raises:
ValueError
: if at mostscale_identity_multiplier
is specified.