Stats
This sub-repository contains modular statistical primitives that are useful
for cuthbert and not already provided by jax.
In particular, it contains a multivariate_normal module, which provides
logpdf and pdf functions for the multivariate normal distribution where the
covariance matrix is provided in square-root (Cholesky) form as opposed
to the full covariance matrix required by
jax.scipy.stats.multivariate_normal.
cuthbertlib.stats.multivariate_normal
Multivariate normal distribution functions with chol_cov input.
logpdf(x, mean, chol_cov, nan_support=True)
Multivariate normal log probability distribution function with chol_cov input.
Here chol_cov is the (generalized) Cholesky factor of the covariance matrix.
Modified version of jax.scipy.stats.multivariate_normal.logpdf which takes
the full covariance matrix as input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ArrayLike
|
Value at which to evaluate the PDF. |
required |
mean
|
ArrayLike
|
Mean of the distribution. |
required |
chol_cov
|
ArrayLike
|
Generalized Cholesky factor of the covariance matrix of the distribution. |
required |
nan_support
|
bool
|
If |
True
|
Returns:
| Type | Description |
|---|---|
Array
|
Array of logpdf values. |
Source code in cuthbertlib/stats/multivariate_normal.py
pdf(x, mean, chol_cov, nan_support=True)
Multivariate normal probability distribution function with chol_cov input.
Here chol_cov is the (generalized) Cholesky factor of the covariance matrix.
Modified version of jax.scipy.stats.multivariate_normal.pdf which takes
the full covariance matrix as input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ArrayLike
|
Value at which to evaluate the PDF. |
required |
mean
|
ArrayLike
|
Mean of the distribution. |
required |
chol_cov
|
ArrayLike
|
Generalized Cholesky factor of the covariance matrix of the distribution. |
required |
nan_support
|
bool
|
If |
True
|
Returns:
| Type | Description |
|---|---|
Array
|
Array of pdf values. |