MultivariateNormalDegenerate.from_penalty()#

classmethod MultivariateNormalDegenerate.from_penalty(loc, var, pen, rank=None, log_pdet=None, validate_args=False, allow_nan_stats=True, name='MultivariateNormalDegenerate')[source]#

Alternative constructor based on a penalty matrix and an inverse smoothing parameter.

Sometimes, the precision matrix of a degenerate multivariate normal distribution is decomposed into a penalty matrix pen and an inverse smoothing parameter var. Using this constructor, a degenerate multivariate normal distribution can be initialized from such a decomposition.

Parameters
  • loc (Any) – The location (= mean) vector.

  • var (Any) – The variance (= inverse smoothing) parameter.

  • pen (Any) – The (potentially rank-deficient) penalty matrix.

  • rank (Union[Any, int, None]) – The rank of the penalty matrix. Optional. (default: None)

  • log_pdet (Union[Any, float, None]) – The log-pseudo-determinant of the penalty matrix. Optional. (default: None)

  • validate_args (bool) – Python bool, default False. When True distribution parameters (default: False) are checked for validity despite possibly degrading runtime performance. When False invalid inputs may silently render incorrect outputs.

  • allow_nan_stats (bool) – Python bool, default True. When True, statistics (e.g., mean, (default: True) 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 (str) – Python str name prefixed to Ops created by this class. (default: 'MultivariateNormalDegenerate')

Warning

If the log-pseudo-determinant is provided as an argument, it must be of the penalty matrix pen, not of the precision matrix.

Notes

If they are not provided as arguments, the constructor computes rank and log_pdet based on the eigenvalues of the penalty matrix pen. This is an expensive operation and can be avoided by specifying the corresponding arguments.

Return type

MultivariateNormalDegenerate