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
penand an inverse smoothing parametervar. 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) – Pythonbool, defaultFalse. WhenTruedistribution parameters (default:False) are checked for validity despite possibly degrading runtime performance. WhenFalseinvalid inputs may silently render incorrect outputs.allow_nan_stats (
bool) – Pythonbool, defaultTrue. WhenTrue, statistics (e.g., mean, (default:True) mode, variance) use the valueNaNto indicate the result is undefined. WhenFalse, an exception is raised if one or more of the statistic’s batch members are undefined.name (
str) – Pythonstrname prefixed toOpscreated by this class. (default:'MultivariateNormalDegenerate')
- Return type:
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
rankandlog_pdetbased on the eigenvalues of the penalty matrixpen. This is an expensive operation and can be avoided by specifying the corresponding arguments.