MultivariateNormalDegenerate
MultivariateNormalDegenerate#
- class liesel.distributions.mvn_degen.MultivariateNormalDegenerate(loc, prec, rank=None, log_pdet=None, validate_args=False, allow_nan_stats=True, name='MultivariateNormalDegenerate')[source]#
Bases:
tensorflow_probability.substrates.jax.distributions.distribution.Distribution
A potentially degenerate multivariate normal distribution.
Provides the alternative constructor
from_penalty()
.- Parameters
loc (
Any
) – The location (= mean) vector.prec (
Any
) – The precision matrix (= a pseudo-inverse of the variance-covariance matrix).rank (
Union
[Any
,int
,None
]) – The rank of the precision matrix. Optional. (default:None
)log_pdet (
Union
[Any
,float
,None
]) – The log-pseudo-determinant of the precision matrix. Optional. (default:None
)validate_args (
bool
) – Pythonbool
, defaultFalse
. WhenTrue
, distribution parameters are checked for validity despite possibly degrading runtime performance. WhenFalse
, invalid inputs may silently render incorrect outputs. (default:False
)allow_nan_stats (
bool
) – Pythonbool
, defaultTrue
. WhenTrue
, statistics (e.g., mean, mode, variance) use the valueNaN
to indicate the result is undefined. WhenFalse
, an exception is raised if one or more of the statistic’s batch members are undefined. (default:True
)name (
str
) – Pythonstr
, name prefixed toOps
created by this class. (default:'MultivariateNormalDegenerate'
)
Notes
If they are not provided as arguments, the constructor computes
rank
andlog_pdet
based on the eigenvalues of the precision matrixprec
. This is an expensive operation and can be avoided by specifying the corresponding arguments.Methods
This has only inherited attributes from another library. Please refer to the original documentation.
from_penalty
(loc, var, pen[, rank, ...])Alternative constructor based on a penalty matrix and an inverse smoothing parameter.