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 (
Any|int|None, default:None) – The rank of the penalty matrix. Optional.log_pdet (
Any|float|None, default:None) – The log-pseudo-determinant of the penalty matrix. Optional.validate_args (
bool, default:False) – Pythonbool, defaultFalse. WhenTruedistribution parameters are checked for validity despite possibly degrading runtime performance. WhenFalseinvalid inputs may silently render incorrect outputs.allow_nan_stats (
bool, default:True) – Pythonbool, defaultTrue. WhenTrue, statistics (e.g., mean, 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, default:'MultivariateNormalDegenerate') – Pythonstrname prefixed toOpscreated by this class.
- 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.